[patch] update directory entry for gnulib

2007-05-13 Thread Bruno Haible
Hello dear directory maintainers,

Here is an update of the directory entry regarding the gnulib package.

diff -u -r1.5 gnulib.txt
--- gnulib.txt  8 Oct 2004 19:04:58 -   1.5
+++ gnulib.txt  13 May 2007 12:47:22 -
@@ -19,19 +19,18 @@
 
 %%short-description: GNU portability library
 
-%%full-description: The 'gnulib' project, still in the planning stage,
-will be a collection of various files that GNU projects can use to
-achieve cross platform portability. Its components are intended to be
-shared at the source level, rather than being a library that gets
-installed and linked against; the idea is to copy files from 'gnulib'
-into your own source tree.
-
-The projct was conceived when we realized that many users and
-developers were introduced to GNU software through the systems that
-they were already using, but that there was no central place for all
-of the special GNU versions to exist. The 'gnulib' project will be
-that central repository. If you would like to contribute to the
-project, please contact any of the maintainers listed below.
+%%full-description:
+Gnulib is intended to be the canonical source for most of the important
+"portability" and/or common files for GNU projects.  These are files
+intended to be shared at the source level; Gnulib is not a library meant
+to be installed and linked against.  Unlike most projects, Gnulib does
+not normally generate a source tarball distribution; instead, developers
+should just grab modules directly from the repository.
+
+While portability across operating systems is not one of GNU's primary
+goals, it has helped introduce many people to the GNU system, and is
+worthwhile when it can be achieved at a low cost.  This collection helps
+lower that cost.
 
 %%category: progmisc
 
@@ -49,9 +48,9 @@
 
 %%touched: 2004-07-13
 
-%%updated: 2004-07-23
+%%updated: 2007-05-13
 
-%%keywords: portability, cross-platform, source code
+%%keywords: portability, cross-platform, source code, posix
 
 %%interface: Library
 
@@ -90,9 +89,9 @@
  
 %%related: 
 
-%%source-language: 
+%%source-language: C
 
-%%supported-languages:
+%%supported-languages: C, C++
 
 %%use-requirements: 
 





fix stdlib.h for C++

2007-05-13 Thread Bruno Haible
This is needed because 'template' is a keyword in C++.

2007-05-13  Bruno Haible  <[EMAIL PROTECTED]>

* lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
when used in C++ mode.

*** lib/stdlib_.h   27 Apr 2007 11:09:11 -  1.9
--- lib/stdlib_.h   13 May 2007 21:43:01 -
***
*** 103,109 
 they are replaced with a string that makes the directory name unique.
 Returns TEMPLATE, or a null pointer if it cannot get a unique name.
 The directory is created mode 700.  */
! extern char * mkdtemp (char *template);
  # endif
  #elif defined GNULIB_POSIXCHECK
  # undef mkdtemp
--- 103,109 
 they are replaced with a string that makes the directory name unique.
 Returns TEMPLATE, or a null pointer if it cannot get a unique name.
 The directory is created mode 700.  */
! extern char * mkdtemp (char * /*template*/);
  # endif
  #elif defined GNULIB_POSIXCHECK
  # undef mkdtemp
***
*** 126,132 
 Returns the open file descriptor if successful, otherwise -1 and errno
 set.  */
  #  define mkstemp rpl_mkstemp
! extern int mkstemp (char *template);
  # else
  /* On MacOS X 10.3, only  declares mkstemp.  */
  #  include 
--- 126,132 
 Returns the open file descriptor if successful, otherwise -1 and errno
 set.  */
  #  define mkstemp rpl_mkstemp
! extern int mkstemp (char * /*template*/);
  # else
  /* On MacOS X 10.3, only  declares mkstemp.  */
  #  include 





fix compilation errors due to 'restrict'

2007-05-13 Thread Bruno Haible
Some modules were using 'restrict' in a declaration in string.h without
ensuring it's properly defined.

2007-05-13  Bruno Haible  <[EMAIL PROTECTED]>

* stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
* stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
* strsep.m4 (gl_FUNC_STRSEP): Likewise.
* strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
(gl_PREREQ_STRTOK_R): Don't require it here.

*** m4/stpcpy.m427 Jan 2007 14:43:17 -  1.4
--- m4/stpcpy.m413 May 2007 21:53:41 -
***
*** 1,4 
! # stpcpy.m4 serial 3
  dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 
! # stpcpy.m4 serial 4
  dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***
*** 9,14 
--- 9,17 
dnl Persuade glibc  to declare stpcpy().
AC_REQUIRE([AC_GNU_SOURCE])
  
+   dnl The stpcpy() declaration in lib/string_.h uses 'restrict'.
+   AC_REQUIRE([AC_C_RESTRICT])
+ 
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(stpcpy)
if test $ac_cv_func_stpcpy = no; then
*** m4/stpncpy.m4   27 Jan 2007 14:43:17 -  1.9
--- m4/stpncpy.m4   13 May 2007 21:53:41 -
***
*** 1,4 
! # stpncpy.m4 serial 6
  dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 
! # stpncpy.m4 serial 7
  dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***
*** 9,14 
--- 9,17 
dnl Persuade glibc  to declare stpncpy().
AC_REQUIRE([AC_GNU_SOURCE])
  
+   dnl The stpncpy() declaration in lib/string_.h uses 'restrict'.
+   AC_REQUIRE([AC_C_RESTRICT])
+ 
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
  
dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function
*** m4/strsep.m427 Jan 2007 14:43:17 -  1.5
--- m4/strsep.m413 May 2007 21:53:41 -
***
*** 1,4 
! # strsep.m4 serial 5
  dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 
! # strsep.m4 serial 6
  dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***
*** 9,14 
--- 9,17 
dnl Persuade glibc  to declare strsep().
AC_REQUIRE([AC_GNU_SOURCE])
  
+   dnl The strsep() declaration in lib/string_.h uses 'restrict'.
+   AC_REQUIRE([AC_C_RESTRICT])
+ 
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strsep)
if test $ac_cv_func_strsep = no; then
*** m4/strtok_r.m4  27 Jan 2007 14:43:17 -  1.5
--- m4/strtok_r.m4  13 May 2007 21:53:41 -
***
*** 1,4 
! # strtok_r.m4 serial 5
  dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 
! # strtok_r.m4 serial 6
  dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***
*** 6,11 
--- 6,14 
  
  AC_DEFUN([gl_FUNC_STRTOK_R],
  [
+   dnl The strtok_r() declaration in lib/string_.h uses 'restrict'.
+   AC_REQUIRE([AC_C_RESTRICT])
+ 
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strtok_r)
AC_CHECK_DECLS_ONCE(strtok_r)
***
*** 17,21 
  
  # Prerequisites of lib/strtok_r.c.
  AC_DEFUN([gl_PREREQ_STRTOK_R], [
!   AC_REQUIRE([AC_C_RESTRICT])
  ])
--- 20,24 
  
  # Prerequisites of lib/strtok_r.c.
  AC_DEFUN([gl_PREREQ_STRTOK_R], [
!   :
  ])