* doc/gnulib-tool.texi (Initial import): Update to match current
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Jan 2007 22:16:55 +0000 (22:16 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Jan 2007 22:16:55 +0000 (22:16 +0000)
behavior with strdup module.
* lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
* lib/memmem.h: Remove; all uses removed.  This is now done
by <string.h>.
* lib/mempcpy.h: Likewise.
* lib/memrchr.h: Likewise.
* lib/stpcpy.h: Likewise.
* lib/stpncpy.h: Likewise.
* lib/strcase.h: Likewise.
* lib/strchrnul.h: Likewise.
* lib/strdup.h: Likewise.
* lib/strndup.h: Likewise.
* lib/strnlen.h: Likewise.
* lib/strpbrk.h: Likewise.
* lib/strsep.h: Likewise.
* lib/strstr.h: Likewise.
* lib/strtok_r.h: Likewise.
* lib/string_.h: New file.
* lib/argp-namefrob.h: Don't include no-longer-existent include files.
Rely on <string.h> instead.
* lib/canon-host.c: Likewise.
* lib/chdir-long.c: Likewise.
* lib/concatpath.c: Likewise.
* lib/exclude.c: Likewise.
* lib/fchdir.c: Likewise.
* lib/getaddrinfo.c: Likewise.
* lib/getcwd.c: Likewise.
* lib/getsubopt.c: Likewise.
* lib/glob.c: Likewise.
* lib/hard-locale.c: Likewise.
* lib/iconvme.c: Likewise.
* lib/javacomp.c: Likewise.
* lib/mempcpy.c: Likewise.
* lib/memrchr.c: Likewise.
* lib/regex_internal.h: Likewise.
* lib/stpncpy.c: Likewise.
* lib/strcasecmp.c: Likewise.
* lib/strchrnul.c: Likewise.
* lib/strdup.c: Likewise.
* lib/striconv.c: Likewise.
* lib/striconveh.c: Likewise.
* lib/striconveha.c: Likewise.
* lib/strncasecmp.c: Likewise.
* lib/strndup.c: Likewise.
* lib/strnlen.c: Likewise.
* lib/strsep.c: Likewise.
* lib/strstr.c: Likewise.
* lib/strtok_r.c: Likewise.
* lib/userspec.c: Likewise.
* lib/w32spawn.h: Likewise.
* lib/xstrndup.c: Likewise.
* lib/mountlist.c (strstr): Remove decl.
* m4/string_h.m4: New file.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
* m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
* m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
* m4/strcase.m4 (gl_FUNC_STRCASECMP):
Set REPLACE_STRCASECMP if necessary.
(gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
* m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
* m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
HAVE_DECL_STRDUP if necessary.
(gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
since gl_FUNC_STRNDUP does that now.
* m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
Check for decl here...
(gl_PREREQ_STRNLEN): ... not here.
* m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
* m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
* m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
necessary.
* modules/string: New file.
* modules/memmem (Files): Remove special-purpose include file.
(Depends-on): Add string.
(Include): Include <string.h>, not the removed file.
* modules/mempcpy: Likewise.
* modules/memrchr: Likewise.
* modules/stpcpy: Likewise.
* modules/stpncpy: Likewise.
* modules/strcase: Likewise.
* modules/strchrnul: Likewise.
* modules/strdup: Likewise.
* modules/strndup: Likewise.
* modules/strnlen: Likewise.
* modules/strpbrk: Likewise.
* modules/strsep: Likewise.
* modules/strstr: Likewise.
* modules/strtok_r: Likewise.
* tests/test-dirname.c: Don't include "stdup.h", since
<string.h> now suffices.
* tests/test-memmem.c: Don't include "memmem.h", since
<string.h> now suffices.

83 files changed:
ChangeLog
doc/gnulib-tool.texi
lib/.cppi-disable
lib/argp-namefrob.h
lib/canon-host.c
lib/chdir-long.c
lib/concatpath.c
lib/exclude.c
lib/fchdir.c
lib/getaddrinfo.c
lib/getcwd.c
lib/getsubopt.c
lib/glob.c
lib/hard-locale.c
lib/iconvme.c
lib/javacomp.c
lib/memmem.h [deleted file]
lib/mempcpy.c
lib/mempcpy.h [deleted file]
lib/memrchr.c
lib/memrchr.h [deleted file]
lib/mountlist.c
lib/regex_internal.h
lib/stpcpy.h [deleted file]
lib/stpncpy.c
lib/stpncpy.h [deleted file]
lib/strcase.h [deleted file]
lib/strcasecmp.c
lib/strchrnul.c
lib/strchrnul.h [deleted file]
lib/strdup.c
lib/strdup.h [deleted file]
lib/striconv.c
lib/striconveh.c
lib/striconveha.c
lib/string_.h [new file with mode: 0644]
lib/strncasecmp.c
lib/strndup.c
lib/strndup.h [deleted file]
lib/strnlen.c
lib/strnlen.h [deleted file]
lib/strpbrk.h [deleted file]
lib/strsep.c
lib/strsep.h [deleted file]
lib/strstr.c
lib/strstr.h [deleted file]
lib/strtok_r.c
lib/strtok_r.h [deleted file]
lib/userspec.c
lib/w32spawn.h
lib/xstrndup.c
m4/memmem.m4
m4/mempcpy.m4
m4/memrchr.m4
m4/stpcpy.m4
m4/stpncpy.m4
m4/strcase.m4
m4/strchrnul.m4
m4/strdup.m4
m4/string_h.m4 [new file with mode: 0644]
m4/strndup.m4
m4/strnlen.m4
m4/strpbrk.m4
m4/strsep.m4
m4/strstr.m4
m4/strtok_r.m4
modules/memmem
modules/mempcpy
modules/memrchr
modules/stpcpy
modules/stpncpy
modules/strcase
modules/strchrnul
modules/strdup
modules/string [new file with mode: 0644]
modules/strndup
modules/strnlen
modules/strpbrk
modules/strsep
modules/strstr
modules/strtok_r
tests/test-dirname.c
tests/test-memmem.c

index 5e1e74a96c2ec66af4aa5ed6ff5e29694eea8f75..f1748b959b740eec17fa60af393b25e40926e209 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,103 @@
+2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * doc/gnulib-tool.texi (Initial import): Update to match current
+       behavior with strdup module.
+       * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
+       * lib/memmem.h: Remove; all uses removed.  This is now done
+       by <string.h>.
+       * lib/mempcpy.h: Likewise.
+       * lib/memrchr.h: Likewise.
+       * lib/stpcpy.h: Likewise.
+       * lib/stpncpy.h: Likewise.
+       * lib/strcase.h: Likewise.
+       * lib/strchrnul.h: Likewise.
+       * lib/strdup.h: Likewise.
+       * lib/strndup.h: Likewise.
+       * lib/strnlen.h: Likewise.
+       * lib/strpbrk.h: Likewise.
+       * lib/strsep.h: Likewise.
+       * lib/strstr.h: Likewise.
+       * lib/strtok_r.h: Likewise.
+       * lib/string_.h: New file.
+       * lib/argp-namefrob.h: Don't include no-longer-existent include files.
+       Rely on <string.h> instead.
+       * lib/canon-host.c: Likewise.
+       * lib/chdir-long.c: Likewise.
+       * lib/concatpath.c: Likewise.
+       * lib/exclude.c: Likewise.
+       * lib/fchdir.c: Likewise.
+       * lib/getaddrinfo.c: Likewise.
+       * lib/getcwd.c: Likewise.
+       * lib/getsubopt.c: Likewise.
+       * lib/glob.c: Likewise.
+       * lib/hard-locale.c: Likewise.
+       * lib/iconvme.c: Likewise.
+       * lib/javacomp.c: Likewise.
+       * lib/mempcpy.c: Likewise.
+       * lib/memrchr.c: Likewise.
+       * lib/regex_internal.h: Likewise.
+       * lib/stpncpy.c: Likewise.
+       * lib/strcasecmp.c: Likewise.
+       * lib/strchrnul.c: Likewise.
+       * lib/strdup.c: Likewise.
+       * lib/striconv.c: Likewise.
+       * lib/striconveh.c: Likewise.
+       * lib/striconveha.c: Likewise.
+       * lib/strncasecmp.c: Likewise.
+       * lib/strndup.c: Likewise.
+       * lib/strnlen.c: Likewise.
+       * lib/strsep.c: Likewise.
+       * lib/strstr.c: Likewise.
+       * lib/strtok_r.c: Likewise.
+       * lib/userspec.c: Likewise.
+       * lib/w32spawn.h: Likewise.
+       * lib/xstrndup.c: Likewise.
+       * lib/mountlist.c (strstr): Remove decl.
+       * m4/string_h.m4: New file.
+       * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
+       * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
+       * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
+       * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
+       * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
+       * m4/strcase.m4 (gl_FUNC_STRCASECMP):
+       Set REPLACE_STRCASECMP if necessary.
+       (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
+       * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
+       * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
+       * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
+       HAVE_DECL_STRDUP if necessary.
+       (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
+       since gl_FUNC_STRNDUP does that now.
+       * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
+       Check for decl here...
+       (gl_PREREQ_STRNLEN): ... not here.
+       * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
+       * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
+       * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
+       * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
+       necessary.
+       * modules/string: New file.
+       * modules/memmem (Files): Remove special-purpose include file.
+       (Depends-on): Add string.
+       (Include): Include <string.h>, not the removed file.
+       * modules/mempcpy: Likewise.
+       * modules/memrchr: Likewise.
+       * modules/stpcpy: Likewise.
+       * modules/stpncpy: Likewise.
+       * modules/strcase: Likewise.
+       * modules/strchrnul: Likewise.
+       * modules/strdup: Likewise.
+       * modules/strndup: Likewise.
+       * modules/strnlen: Likewise.
+       * modules/strpbrk: Likewise.
+       * modules/strsep: Likewise.
+       * modules/strstr: Likewise.
+       * modules/strtok_r: Likewise.
+       * tests/test-dirname.c: Don't include "stdup.h", since
+       <string.h> now suffices.
+       * tests/test-memmem.c: Don't include "memmem.h", since
+       <string.h> now suffices.
+
 2007-01-25  Bruno Haible  <bruno@clisp.org>
 
        * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
index 01ea29d1208e25c96c931c328ff9aef56b18b9e5..ca49a17d979ed5e5284efce8fbf49be873d3681b 100644 (file)
@@ -1,7 +1,7 @@
 @node Invoking gnulib-tool
 @chapter Invoking gnulib-tool
 
-@c Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+@c Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.2 or
@@ -48,29 +48,42 @@ Gnulib is used.
 
 Our example will be a library that uses Autoconf, Automake and
 Libtool.  It calls @code{strdup}, and you wish to use gnulib to make
-the package portable to C89 (which doesn't have @code{strdup}).
+the package portable to C89 and C99 (which don't have @code{strdup}).
 
 @example
 ~/src/libfoo$ gnulib-tool --import strdup
 Module list with included dependencies:
+  absolute-header
+  extensions
   strdup
+  string
 File list:
+  lib/dummy.c
   lib/strdup.c
-  lib/strdup.h
-  m4/onceonly_2_57.m4
+  lib/string_.h
+  m4/absolute-header.m4
+  m4/extensions.m4
+  m4/gnulib-common.m4
   m4/strdup.m4
-Copying file m4/gnulib-tool.m4
-Copying file m4/onceonly_2_57.m4
+  m4/string_h.m4
+Creating directory ./lib
+Creating directory ./m4
+Copying file lib/dummy.c
 Copying file lib/strdup.c
-Copying file lib/strdup.h
+Copying file lib/string_.h
+Copying file m4/absolute-header.m4
+Copying file m4/extensions.m4
+Copying file m4/gnulib-common.m4
+Copying file m4/gnulib-tool.m4
 Copying file m4/strdup.m4
+Copying file m4/string_h.m4
 Creating lib/Makefile.am
 Creating m4/gnulib-cache.m4
 Creating m4/gnulib-comp.m4
 Finished.
 
 You may need to add #include directives for the following .h files.
-  #include "strdup.h"
+  #include <string.h>
 
 Don't forget to
   - add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac,
@@ -212,7 +225,7 @@ LDADD = lib/libgnu.a
 @end example
 
 Don't forget to @code{#include} the various header files.  In this
-example, you would need to make sure that @samp{#include "strdup.h"}
+example, you would need to make sure that @samp{#include <string.h>}
 is evaluated when compiling all source code files, that want to make
 use of @code{strdup}.
 
index 049783935fd96e33037f6c6cccc51c3c09ccb04c..465cbbf8c3d085bc77506f6168d3d86495761d36 100644 (file)
@@ -34,10 +34,6 @@ socket_.h
 stat-time.h
 stdbool_.h
 stdint_.h
-strcase.h
-strdup.h
-strndup.h
-strnlen.h
 strnlen1.h
 strtoul.c
 time_r.h
index f10f58297bb43686e8d0f9e50877e287932cb55f..6fe99cd7aaf17a877a54562a364dc4f49aa8c2de 100644 (file)
@@ -1,5 +1,5 @@
 /* Name frobnication for compiling argp outside of glibc
-   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
 #undef __argp_fmtstream_wmargin
 #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
 
-#include "mempcpy.h"
-#include "strcase.h"
-#include "strchrnul.h"
-#include "strndup.h"
-
 /* normal libc functions we call */
 #undef __flockfile
 #define __flockfile flockfile
index c29f314314f4a457c64e5a997f22eee565b90d3e..50ba67a6cfd11222cc91936c79acb2ad684d28b4 100644 (file)
@@ -1,6 +1,6 @@
 /* Host name canonicalization
 
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
    Written by Derek Price <derek@ximbiot.com>.
 
@@ -22,8 +22,9 @@
 
 #include "canon-host.h"
 
+#include <string.h>
+
 #include "getaddrinfo.h"
-#include "strdup.h"
 
 /* Store the last error for the single-threaded version of this function.  */
 static int last_cherror;
index 8d0f0622288465dad6af1a4947dddb8d0300f93b..3fc7ef2a841831edc83f6bf1842b31456093dbc1 100644 (file)
@@ -1,5 +1,5 @@
 /* provide a chdir function that tries not to fail due to ENAMETOOLONG
-   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include "memrchr.h"
 #include "openat.h"
 
 #ifndef PATH_MAX
index 01e47f393ec0b3fa2815a4a39e33d7451d375f90..a6d4173562d1e29f64c2ab113b7aa192e93b2407 100644 (file)
@@ -1,5 +1,5 @@
 /* Construct a full pathname from a directory and a filename.
-   Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "xalloc.h"
-#include "stpcpy.h"
 
 /* Concatenate a directory pathname, a relative pathname and an optional
    suffix.  The directory may end with the directory separator.  The second
index 508b888447f6d487e63157bd3c92a6e7192ddf43..5b726ff23cbcadf1f9520f947e0266e67360e24a 100644 (file)
@@ -1,7 +1,7 @@
 /* exclude.c -- exclude file names
 
    Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,7 +33,6 @@
 
 #include "exclude.h"
 #include "fnmatch.h"
-#include "strcase.h"
 #include "xalloc.h"
 #include "verify.h"
 
index c05a9f3149bf0b21eb52615cef6f1f0396203356..f3a9dfd620bb536b84d77a9eb4c8b336c32a6ae5 100644 (file)
@@ -1,5 +1,5 @@
 /* fchdir replacement.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -28,7 +29,6 @@
 
 #include "canonicalize.h"
 #include "dirfd.h"
-#include "strdup.h"
 
 /* This replacement assumes that a directory is not renamed while opened
    through a file descriptor.  */
index f523f7658ed9eb059806ccbcee686b5247967394..add56ba1bd85be25d639db7021edd369860f7eeb 100644 (file)
@@ -1,5 +1,5 @@
 /* Get address information (partial implementation).
-   Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software
+   Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
    Foundation, Inc.
    Contributed by Simon Josefsson <simon@josefsson.org>.
 
@@ -28,7 +28,7 @@
 /* Get calloc. */
 #include <stdlib.h>
 
-/* Get memcpy. */
+/* Get memcpy, strdup. */
 #include <string.h>
 
 #include <stdbool.h>
@@ -39,7 +39,6 @@
 
 #include "inet_ntop.h"
 #include "snprintf.h"
-#include "strdup.h"
 
 /* BeOS has AF_INET, but not PF_INET.  */
 #ifndef PF_INET
index f13da4dcc69feda0ad56c88cd5651a3c7fcd6b25..978c5383737da0672fa98a1c71a7f2b377360095 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2004,2005,2006 Free Software
+/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2004,2005,2006,2007 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -49,8 +49,6 @@
 # ifndef mempcpy
 #  define mempcpy __mempcpy
 # endif
-#else
-# include "mempcpy.h"
 #endif
 
 #include <limits.h>
index 2625249b967b3ce5069ca1b625f7b4dde0df354b..4e9f1b08472a053ff434c40ef928c722ee44c655 100644 (file)
@@ -1,5 +1,5 @@
 /* Parse comma separate list into words.
-   Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2004, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -24,7 +24,6 @@
 /* This code is written for inclusion in gnu-libc, and uses names in
    the namespace reserved for libc.  If we're compiling in gnulib,
    define those names to be the normal ones instead.  */
-# include "strchrnul.h"
 # undef __strchrnul
 # define __strchrnul strchrnul
 #endif
index edef095e6d32388d00354c1ef902fa11fe3939f4..ccd0e7afcd84bf17e56fb871091a8ce25b24686a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 # define struct_stat64         struct stat64
 #else /* !_LIBC */
 # include "getlogin_r.h"
-# include "mempcpy.h"
-# include "strdup.h"
 # define __stat64(fname, buf)  stat (fname, buf)
 # define struct_stat64         struct stat
 # define __stat(fname, buf)    stat (fname, buf)
index ef3912698ef3cff5c0ab10ceb0c986cfa5d0f852..dd2ba48439cfb5d95c8cb5312d3d2c0eee368ecf 100644 (file)
@@ -1,6 +1,6 @@
 /* hard-locale.c -- Determine whether a locale is hard.
 
-   Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006 Free
+   Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006, 2007 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -25,8 +25,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "strdup.h"
-
 #ifdef __GLIBC__
 # define GLIBC_VERSION __GLIBC__
 #else
index 7403242ba0e75b9e158951a8f14751dd19fbc607..0018aa308be5a53641ee527713ee308714027b4a 100644 (file)
@@ -23,7 +23,7 @@
 /* Get malloc. */
 #include <stdlib.h>
 
-/* Get strcmp. */
+/* Get strcmp, strdup. */
 #include <string.h>
 
 /* Get errno. */
@@ -31,9 +31,6 @@
 
 #ifdef _LIBC
 # define HAVE_ICONV 1
-#else
-/* Get strdup. */
-# include "strdup.h"
 #endif
 
 #if HAVE_ICONV
index 5d3d60be4fd42eac65e6b868088861d1fe57d9d8..3e0ca1b96170445934ada893498d628ae9617764 100644 (file)
@@ -1,5 +1,5 @@
 /* Compile a Java program.
-   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2006, 2007 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -48,7 +48,6 @@
 #include "clean-temp.h"
 #include "error.h"
 #include "xvasprintf.h"
-#include "strstr.h"
 #include "gettext.h"
 
 #define _(str) gettext (str)
diff --git a/lib/memmem.h b/lib/memmem.h
deleted file mode 100644 (file)
index 915a08b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2004 Free Software Foundation
- * Written by Simon Josefsson
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
-
-#ifndef MEMMEM_H
-# define MEMMEM_H
-
-/* Get memmem, if available. */
-# include <string.h>
-
-# if defined HAVE_DECL_MEMMEM && !HAVE_DECL_MEMMEM
-void *
-memmem (const void *haystack, size_t haystack_len,
-       const void *needle, size_t needle_len);
-# endif
-
-#endif /* MEMMEM_H */
index 3502da2441be52e9939d47c3826915c89212321f..af0ed452ec3a17cc62402cccb0476d7985248cee 100644 (file)
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,8 +16,6 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* Specification.  */
-#include "mempcpy.h"
-
 #include <string.h>
 
 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
diff --git a/lib/mempcpy.h b/lib/mempcpy.h
deleted file mode 100644 (file)
index fa20321..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef mempcpy
-
-# if HAVE_MEMPCPY
-
-/* Get mempcpy() declaration.  */
-#  include <string.h>
-
-# else
-
-/* Get size_t */
-#  include <stddef.h>
-
-/* Copy N bytes of SRC to DEST, return pointer to bytes after the
-   last written byte.  */
-extern void *mempcpy (void *dest, const void *src, size_t n);
-
-# endif
-
-#endif
index 471511c57f5f21d0b4f069c47240dea81900d9e5..0b5661b0742edbdac83eb3c07e9c6b68a360bf20 100644 (file)
@@ -1,7 +1,7 @@
 /* memrchr -- find the last occurrence of a byte in a memory block
 
    Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005,
-   2006 Free Software Foundation, Inc.
+   2006, 2007 Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
@@ -28,7 +28,6 @@
 # include <memcopy.h>
 #else
 # include <config.h>
-# include "memrchr.h"
 # define reg_char char
 #endif
 
diff --git a/lib/memrchr.h b/lib/memrchr.h
deleted file mode 100644 (file)
index d4785c2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* memrchr -- Find the last occurrence of a byte in a memory block.
-
-   Copyright (C) 2005 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#if HAVE_DECL_MEMRCHR
-# include <string.h>
-#else
-# include <stddef.h>
-
-/* Search backwards through a block for a byte (specified as an int).  */
-void *memrchr (void const *, int, size_t);
-
-#endif
index bb01f91efb6b694156e9b84dbbd4dfa4fbb3e37a..a50828e39540defa576777793fde48b8e6e0050d 100644 (file)
@@ -1,7 +1,7 @@
 /* mountlist.c -- return a list of mounted file systems
 
    Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "xalloc.h"
 
-#ifndef strstr
-char *strstr ();
-#endif
-
 #include <errno.h>
 
 #include <fcntl.h>
index b0f7e657ce37bf7ccfe0bb135aec264c6a311dc8..bd12572f489d85aac91b8a7509d87b715a91769b 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#ifndef _LIBC
-# include "strcase.h"
-#endif
-
 #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
 # include <langinfo.h>
 #endif
diff --git a/lib/stpcpy.h b/lib/stpcpy.h
deleted file mode 100644 (file)
index 53c4ce0..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* String copying.
-   Copyright (C) 1995, 2001, 2003 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _STPCPY_H
-#define _STPCPY_H
-
-#if HAVE_STPCPY
-
-/* Get stpcpy() declaration.  */
-#include <string.h>
-
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
-extern char *stpcpy (char *dst, const char *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#endif /* _STPCPY_H */
index 9c0b1670bc0993f4d8faa192e1432048449632ca..2a5f81c581561dc2c039b31af445cb1627361709 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2006 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
@@ -22,7 +22,7 @@
 #include <config.h>
 
 /* Specification.  */
-#include "stpncpy.h"
+#include <string.h>
 
 #ifndef weak_alias
 # define __stpncpy stpncpy
diff --git a/lib/stpncpy.h b/lib/stpncpy.h
deleted file mode 100644 (file)
index 1ecb3e8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* String copying.
-   Copyright (C) 1995, 2001-2005 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _STPNCPY_H
-#define _STPNCPY_H
-
-#include <string.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if !HAVE_STPNCPY
-
-/* When not using the GNU libc we use the stpncpy implementation we
-   provide here.  */
-#define stpncpy gnu_stpncpy
-
-/* Copy no more than N bytes of SRC to DST, returning a pointer past the
-   last non-NUL byte written into DST.  */
-extern char *stpncpy (char *dst, const char *src, size_t n);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _STPNCPY_H */
diff --git a/lib/strcase.h b/lib/strcase.h
deleted file mode 100644 (file)
index 07d4c9a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Case-insensitive string comparison functions.
-   Copyright (C) 1995-1996, 2001, 2003, 2005-2006 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _STRCASE_H
-#define _STRCASE_H
-
-#include <stddef.h>
-/* Include header files with a possibly conflicting declarations of strcasecmp
-   before we define it as a macro, so that they will be no-ops if included
-   after strcasecmp is defined as a macro.  */
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* No known system has a strcasecmp() function that works correctly in
-   multibyte locales.  Therefore we use our version always.  */
-#define strcasecmp rpl_strcasecmp
-/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
-   greater than zero if S1 is lexicographically less than, equal to or greater
-   than S2.
-   Note: This function may, in multibyte locales, return 0 for strings of
-   different lengths!  */
-extern int strcasecmp (const char *s1, const char *s2);
-
-/* Compare no more than N characters of strings S1 and S2, ignoring case,
-   returning less than, equal to or greater than zero if S1 is
-   lexicographically less than, equal to or greater than S2.
-   Note: This function can not work correctly in multibyte locales.  */
-#if ! HAVE_DECL_STRNCASECMP
-extern int strncasecmp (const char *s1, const char *s2, size_t n);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _STRCASE_H */
index 99d5dd22a3e2e93c3a903f7b7f3601b08270ae79..f63e64e3b72a29badad882e0c3d2659e7891fed1 100644 (file)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005,
    based on earlier glibc code.
 
@@ -20,7 +20,7 @@
 #include <config.h>
 
 /* Specification.  */
-#include "strcase.h"
+#include <string.h>
 
 #include <ctype.h>
 #include <limits.h>
index 8d17f15909a8a92f7d3b1c073135bf5cc2fceb1e..03c49c3ea2ba750685f6280ae6b637e4c55171d7 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* Specification.  */
-#include "strchrnul.h"
+#include <string.h>
 
 /* Find the first occurrence of C in S or the final NUL byte.  */
 char *
diff --git a/lib/strchrnul.h b/lib/strchrnul.h
deleted file mode 100644 (file)
index 5a31b96..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Searching in a string.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#if HAVE_STRCHRNUL
-
-/* Get strchrnul() declaration.  */
-#include <string.h>
-
-#else
-
-/* Find the first occurrence of C in S or the final NUL byte.  */
-extern char *strchrnul (const char *s, int c_in);
-
-#endif
index 17d40d622d8643198404668bf51d17297bd89b61..c614108786854179a5499ab49b9b5a66cc33e472 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006 Free
+/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007 Free
    Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
 #ifndef _LIBC
 # include <config.h>
-/* Get specification.  */
-# include "strdup.h"
 #endif
 
-#include <stdlib.h>
+/* Get specification.  */
 #include <string.h>
 
+#include <stdlib.h>
+
 #undef __strdup
 #ifdef _LIBC
 # undef strdup
diff --git a/lib/strdup.h b/lib/strdup.h
deleted file mode 100644 (file)
index 73e66e3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* strdup.h -- duplicate a string
-   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef STRDUP_H_
-#define STRDUP_H_
-
-/* Get strdup declaration, if available.  */
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if defined HAVE_DECL_STRDUP && !HAVE_DECL_STRDUP && !defined strdup
-/* Duplicate S, returning an identical malloc'd string.  */
-extern char *strdup (const char *s);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* STRDUP_H_ */
index 3703e9c58669e9ce387d87b0530efd8012af4cb4..ea4fa2979edce1a03b042e608fa64c44eca136ae 100644 (file)
@@ -31,7 +31,6 @@
 # include <limits.h>
 #endif
 
-#include "strdup.h"
 #include "c-strcase.h"
 
 #ifndef SIZE_MAX
index 191598b84e2d97aac76297bbd1b70a70ebd8e375..167ac92afcff7f03dddd19d1e0645e41af747347 100644 (file)
@@ -33,7 +33,6 @@
 # include "unistr.h"
 #endif
 
-#include "strdup.h"
 #include "c-strcase.h"
 #include "c-strcaseeq.h"
 
index 78dfddc42d19cf64166ab1c7cdd904dd9ead415b..fdb84216547da155db5832a678ec01beae6239d9 100644 (file)
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "allocsa.h"
-#include "strdup.h"
 #include "c-strcase.h"
 
 #define SIZEOF(a) (sizeof(a)/sizeof(a[0]))
diff --git a/lib/string_.h b/lib/string_.h
new file mode 100644 (file)
index 0000000..4bd7518
--- /dev/null
@@ -0,0 +1,171 @@
+/* A GNU-like <string.h>.
+
+   Copyright (C) 2007 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+#include @ABSOLUTE_STRING_H@
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the first occurrence of NEEDLE in HAYSTACK.  */
+#if ! @HAVE_DECL_MEMMEM@
+void *
+memmem (void const *__haystack, size_t __haystack_len,
+       void const *__needle, size_t __needle_len);
+#endif
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+   last written byte.  */
+#if ! @HAVE_MEMPCPY@
+void *mempcpy (void *restrict __dest, void const *restrict __src, size_t __n);
+#endif
+
+/* Search backwards through a block for a byte (specified as an int).  */
+#if ! @HAVE_DECL_MEMRCHR@
+void *memrchr (void const *, int, size_t);
+#endif
+
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
+#if ! @HAVE_STPCPY@
+char *stpcpy (char *restrict __dst, char const *restrict __src);
+#endif
+
+/* Copy no more than N bytes of SRC to DST, returning a pointer past the
+   last non-NUL byte written into DST.  */
+#if ! @HAVE_STPNCPY@
+# define stpncpy gnu_stpncpy
+char *stpncpy (char *restrict __dst, char const *restrict __src, size_t __n);
+#endif
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function may, in multibyte locales, return 0 for strings of
+   different lengths!
+   No known system has a strcasecmp() function that works correctly in
+   multibyte locales.  Therefore use our version always, if the
+   strcase module is available.  */
+#if @REPLACE_STRCASECMP@
+# define strcasecmp rpl_strcasecmp
+int strcasecmp (char const *__s1, char const *__s2);
+#endif
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function cannot work correctly in multibyte locales.  */
+#if ! @HAVE_DECL_STRNCASECMP@
+int strncasecmp (char const *__s1, char const *__s2, size_t __n);
+#endif
+
+/* Find the first occurrence of C in S or the final NUL byte.  */
+#if ! @HAVE_STRCHRNUL@
+char *strchrnul (char const *__s, int __c_in);
+#endif
+
+/* Duplicate S, returning an identical malloc'd string.  */
+#if ! @HAVE_DECL_STRDUP@ && ! defined strdup
+char *strdup (char const *__s);
+#endif
+
+/* Return a newly allocated copy of at most N bytes of STRING.  */
+#if ! @HAVE_STRNDUP@
+# undef strndup
+# define strndup rpl_strndup
+# if ! @HAVE_DECL_STRNDUP@
+char *strndup (char const *__string, size_t __n);
+# endif
+#endif
+
+/* Find the length (number of bytes) of STRING, but scan at most
+   MAXLEN bytes.  If no '\0' terminator is found in that many bytes,
+   return MAXLEN.  */
+#if ! @HAVE_DECL_STRNLEN@
+size_t strnlen (char const *__string, size_t __maxlen);
+#endif
+
+/* Find the first occurrence in S of any character in ACCEPT.  */
+#if ! @HAVE_STRPBRK@
+char *strpbrk (char const *__s, char const *__accept);
+#endif
+
+/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
+   If one is found, overwrite it with a NUL, and advance *STRINGP
+   to point to the next char after it.  Otherwise, set *STRINGP to NULL.
+   If *STRINGP was already NULL, nothing happens.
+   Return the old value of *STRINGP.
+
+   This is a variant of strtok() that is multithread-safe and supports
+   empty fields.
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+   Caveat: It doesn't work with multibyte strings unless all of the delimiter
+           characters are ASCII characters < 0x30.
+
+   See also strtok_r().  */
+#if ! @HAVE_STRSEP@
+char *strsep (char **restrict __stringp, char const *restrict __delim);
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.
+   No known system has a strstr() function that works correctly in
+   multibyte locales.  Therefore use our version always, if the strstr
+   module is available.  */
+#if @REPLACE_STRSTR@
+# undef strstr
+# define strstr rpl_strstr
+char *strstr (char const *__haystack, char const *__needle);
+#endif
+
+/* Parse S into tokens separated by characters in DELIM.
+   If S is NULL, the saved pointer in SAVE_PTR is used as
+   the next starting point.  For example:
+       char s[] = "-abc-=-def";
+       char *sp;
+       x = strtok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
+       x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
+       x = strtok_r(NULL, "=", &sp);   // x = NULL
+               // s = "abc\0-def\0"
+
+   This is a variant of strtok() that is multithread-safe.
+
+   For the POSIX documentation for this function, see:
+   http://www.opengroup.org/susv3xsh/strtok.html
+
+   Caveat: It modifies the original string.
+   Caveat: These functions cannot be used on constant strings.
+   Caveat: The identity of the delimiting character is lost.
+   Caveat: It doesn't work with multibyte strings unless all of the delimiter
+           characters are ASCII characters < 0x30.
+
+   See also strsep().  */
+#if ! @HAVE_DECL_STRTOK_R@
+char *strtok_r (char *restrict __s, char const *restrict __sep,
+               char **restrict __lasts);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index f59b953a7d96ff0ce0c3df9966dbebec1d07c5ea..14ae204b9c08c5f8166609011ab517ff4eeeb501 100644 (file)
@@ -1,5 +1,5 @@
 /* strncasecmp.c -- case insensitive string comparator
-   Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 #include <config.h>
 
 /* Specification.  */
-#include "strcase.h"
+#include <string.h>
 
 #include <ctype.h>
 #include <limits.h>
index 290f494f4e2b69179a08b03ca5b7f10a07d0025d..3a1b0eae2e0695b5a3aabf67fdf7187f9bd8f074 100644 (file)
@@ -1,7 +1,7 @@
 /* A replacement function, for systems that lack strndup.
 
-   Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006 Free
-   Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007
+   Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include <config.h>
-#include "strndup.h"
 
-#include <stdlib.h>
 #include <string.h>
 
-#include "strnlen.h"
+#include <stdlib.h>
 
 char *
 strndup (char const *s, size_t n)
diff --git a/lib/strndup.h b/lib/strndup.h
deleted file mode 100644 (file)
index b983dd2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Duplicate a size-bounded string.
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-/* Get size_t.  */
-#include <stddef.h>
-/* If HAVE_STRNDUP, get the strndup declaration.
-   If !HAVE_STRNDUP, include <string.h> now so that it doesn't cause
-   trouble if included later.  */
-#include <string.h>
-
-#if !HAVE_STRNDUP
-# undef strndup
-# define strndup rpl_strndup
-# if !HAVE_DECL_STRNDUP  /* Don't risk conflicting declarations.  */
-/* Return a newly allocated copy of at most N bytes of STRING.  */
-extern char *strndup (const char *string, size_t n);
-# endif
-#endif
index 593fd1b7c8c149cb2d7c9fb98ca83315d1ff403f..d346d3272c29dfef52a9c18787d2adfc13c87c43 100644 (file)
@@ -1,5 +1,5 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#include "strnlen.h"
+#include <string.h>
 
 /* Find the length of STRING, but scan at most MAXLEN characters.
    If no '\0' terminator is found in that many characters, return MAXLEN.  */
diff --git a/lib/strnlen.h b/lib/strnlen.h
deleted file mode 100644 (file)
index ba74dba..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005 Free Software Foundation, Inc.
-   Written by Simon Josefsson.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef STRNLEN_H
-#define STRNLEN_H
-
-/* Get strnlen declaration, if available.  */
-#include <string.h>
-
-#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN
-/* Find the length (number of bytes) of STRING, but scan at most
-   MAXLEN bytes.  If no '\0' terminator is found in that many bytes,
-   return MAXLEN.  */
-extern size_t strnlen(const char *string, size_t maxlen);
-#endif
-
-#endif /* STRNLEN_H */
diff --git a/lib/strpbrk.h b/lib/strpbrk.h
deleted file mode 100644 (file)
index acc8d35..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Searching in a string.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#if HAVE_STRPBRK
-
-/* Get strpbrk() declaration.  */
-#include <string.h>
-
-#else
-
-/* Find the first occurrence in S of any character in ACCEPT.  */
-extern char *strpbrk (const char *s, const char *accept);
-
-#endif
index db2b074c853094185752c97f4beeb557489d4bac..1a86852b8d907341ce8c246db850d8887c8cf7b9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007 Free Software Foundation, Inc.
 
    Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
 
 #endif
 
 /* Specification.  */
-#include "strsep.h"
-
 #include <string.h>
 
-#include "strpbrk.h"
-
 char *
 strsep (char **stringp, const char *delim)
 {
diff --git a/lib/strsep.h b/lib/strsep.h
deleted file mode 100644 (file)
index ca28a2f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
-
-   Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef GNULIB_STRSEP_H_
-#define GNULIB_STRSEP_H_
-
-#if HAVE_STRSEP
-
-/*
- * Get strsep() declaration.
- */
-#include <string.h>
-
-#else
-
-/* Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
-   If one is found, it is overwritten with a NUL, and *STRINGP is advanced
-   to point to the next char after it.  Otherwise, *STRINGP is set to NULL.
-   If *STRINGP was already NULL, nothing happens.
-   Returns the old value of *STRINGP.
-
-   This is a variant of strtok() that is multithread-safe and supports
-   empty fields.
-
-   Caveat: It modifies the original string.
-   Caveat: These functions cannot be used on constant strings.
-   Caveat: The identity of the delimiting character is lost.
-   Caveat: It doesn't work with multibyte strings unless all of the delimiter
-           characters are ASCII characters < 0x30.
-
-   See also strtok_r().  */
-
-extern char *strsep (char **stringp, const char *delim);
-
-#endif
-
-#endif /* GNULIB_STRSEP_H_ */
index f1e2ef698887aa8be5aae354a148e4ba105c18ed..2ee16507a80916012bfb9d8e64be54531be782d9 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
    This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,9 @@
 #include <config.h>
 
 /* Specification.  */
-#include "strstr.h"
+#include <string.h>
 
-#include <stddef.h>  /* for NULL */
+#include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 
 #if HAVE_MBRTOWC
 # include "mbuiter.h"
diff --git a/lib/strstr.h b/lib/strstr.h
deleted file mode 100644 (file)
index a28b140..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Searching in a string.
-   Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-
-/* Include string.h: on glibc systems, it contains a macro definition of
-   strstr() that would collide with our definition if included afterwards.  */
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* No known system has a strstr() function that works correctly in
-   multibyte locales. Therefore we use our version always.  */
-#undef strstr
-#define strstr rpl_strstr
-
-/* Find the first occurrence of NEEDLE in HAYSTACK.  */
-extern char *strstr (const char *haystack, const char *needle);
-
-#ifdef __cplusplus
-}
-#endif
index 4a21cae97068af6ad2c0fda609ca70228a5fb5ab..fde7b5cdafd41d837333ec2fd747b505ebab648a 100644 (file)
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991,1996-1999,2001,2004 Free Software Foundation, Inc.
+   Copyright (C) 1991,1996-1999,2001,2004,2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -26,8 +26,6 @@
 #undef __strtok_r
 
 #ifndef _LIBC
-/* Get specification.  */
-# include "strtok_r.h"
 # define __strtok_r strtok_r
 # define __rawmemchr strchr
 #endif
diff --git a/lib/strtok_r.h b/lib/strtok_r.h
deleted file mode 100644 (file)
index 7d3f21b..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Split string into tokens
-   Copyright (C) 2004-2005 Free Software Foundation, Inc.
-   Written by Simon Josefsson.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef STRTOK_R_H
-#define STRTOK_R_H
-
-/* Get strtok_r declaration, if available.  */
-#include <string.h>
-
-/* Parse S into tokens separated by characters in DELIM.
-   If S is NULL, the saved pointer in SAVE_PTR is used as
-   the next starting point.  For example:
-       char s[] = "-abc-=-def";
-       char *sp;
-       x = strtok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
-       x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
-       x = strtok_r(NULL, "=", &sp);   // x = NULL
-               // s = "abc\0-def\0"
-
-   This is a variant of strtok() that is multithread-safe.
-
-   For the POSIX documentation for this function, see:
-   http://www.opengroup.org/susv3xsh/strtok.html
-
-   Caveat: It modifies the original string.
-   Caveat: These functions cannot be used on constant strings.
-   Caveat: The identity of the delimiting character is lost.
-   Caveat: It doesn't work with multibyte strings unless all of the delimiter
-           characters are ASCII characters < 0x30.
-
-   See also strsep().
-*/
-#if defined HAVE_DECL_STRTOK_R && !HAVE_DECL_STRTOK_R
-extern char *strtok_r(char *restrict s, const char *restrict sep,
-                     char **restrict lasts);
-#endif
-
-#endif /* STRTOK_R_H */
index 5f4f2af31852f034cdb8813eba0f19cb883bf6d5..c1f580a17ffe4c66bf5eca4a096a693f8676faf4 100644 (file)
@@ -41,7 +41,6 @@
 
 #include "intprops.h"
 #include "inttostr.h"
-#include "strdup.h"
 #include "xalloc.h"
 #include "xstrtol.h"
 
index 6beaafd22565c9287f0eb24576649d1e5f5246d7..18c78242ef361ece57a942dea219129bc2b3bc70 100644 (file)
@@ -1,5 +1,5 @@
 /* Auxiliary functions for the creation of subprocesses.  Native Woe32 API.
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,9 +24,9 @@
 #include <io.h>
 
 #include <stdbool.h>
+#include <string.h>
 #include <errno.h>
 
-#include "strpbrk.h"
 #include "xalloc.h"
 
 /* Duplicates a file handle, making the copy uninheritable.  */
index afcbc1ab2c07ed8f1ad7cc287085c9ff27b417f9..7ccefd798a0227d0007cc92332c960c09f7582aa 100644 (file)
@@ -1,6 +1,6 @@
 /* Duplicate a bounded initial segment of a string, with out-of-memory
    checking.
-   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 /* Specification.  */
 #include "xstrndup.h"
 
-#include "strndup.h"
+#include <string.h>
 #include "xalloc.h"
 
 /* Return a newly allocated copy of at most N bytes of STRING.
index 86072eaac1688b90a1345b162d36fdb423deea04..e4806950f3f5ae316ed46cd3ade90880cbff69f0 100644 (file)
@@ -1,5 +1,5 @@
-# memmem.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# memmem.m4 serial 3
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,9 @@ AC_DEFUN([gl_FUNC_MEMMEM],
 
   AC_REPLACE_FUNCS(memmem)
   AC_CHECK_DECLS_ONCE(memmem)
+  if test $ac_cv_have_decl_memmem = no; then
+    HAVE_DECL_MEMMEM=0
+  fi
   gl_PREREQ_MEMMEM
 ])
 
index 9aec73dc5bd695fb3e053178decf09a7e8f53993..efb2eb05b4080fdd789a9f28d76893c40abd90df 100644 (file)
@@ -1,5 +1,5 @@
-# mempcpy.m4 serial 4
-dnl Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# mempcpy.m4 serial 5
+dnl Copyright (C) 2003, 2004, 2006, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,7 @@ AC_DEFUN([gl_FUNC_MEMPCPY],
 
   AC_REPLACE_FUNCS(mempcpy)
   if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
     gl_PREREQ_MEMPCPY
   fi
 ])
index 5d971551df83fa4057f3c05e9c5bcb436f5893d1..8d511b06187167f4ce3eaa1dd713edb9617dd048 100644 (file)
@@ -1,5 +1,5 @@
-# memrchr.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+# memrchr.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,9 @@ AC_DEFUN([gl_FUNC_MEMRCHR],
   AC_REQUIRE([AC_GNU_SOURCE])
 
   AC_CHECK_DECLS_ONCE([memrchr])
+  if test $ac_cv_have_decl_memrchr = no; then
+    HAVE_DECL_MEMRCHR=0
+  fi
 
   AC_REPLACE_FUNCS(memrchr)
   if test $ac_cv_func_memrchr = no; then
index ce8d92fb12f005870c0a0f4785e448e13045d9f2..b64a662506219b39c01e7d48d0954249de501e53 100644 (file)
@@ -1,5 +1,5 @@
-# stpcpy.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# stpcpy.m4 serial 2
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_STPCPY],
 
   AC_REPLACE_FUNCS(stpcpy)
   if test $ac_cv_func_stpcpy = no; then
+    HAVE_STPCPY=0
     gl_PREREQ_STPCPY
   fi
 ])
@@ -19,4 +20,3 @@ AC_DEFUN([gl_FUNC_STPCPY],
 AC_DEFUN([gl_PREREQ_STPCPY], [
   :
 ])
-
index ec88b54427fc4ed7e8bbb6d645c62a3c2223111c..88525793693e523d0148abc3484e565c4582afa9 100644 (file)
@@ -1,5 +1,5 @@
-# stpncpy.m4 serial 4
-dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
+# stpncpy.m4 serial 5
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -51,6 +51,7 @@ int main () {
     AC_DEFINE(HAVE_STPNCPY, 1,
       [Define if you have the stpncpy() function and it works.])
   else
+    HAVE_STPNCPY=0
     AC_LIBOBJ([stpncpy])
     gl_PREREQ_STPNCPY
   fi
@@ -60,4 +61,3 @@ int main () {
 AC_DEFUN([gl_PREREQ_STPNCPY], [
   :
 ])
-
index ae8279078605ad159fc0eacb967ecee7356f51ef..bcb969e9961b5abcb83aba61dd23bf40ba0b0fd2 100644 (file)
@@ -1,5 +1,5 @@
-# strcase.m4 serial 4
-dnl Copyright (C) 2002, 2005-2006 Free Software Foundation, Inc.
+# strcase.m4 serial 5
+dnl Copyright (C) 2002, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,15 +16,19 @@ AC_DEFUN([gl_FUNC_STRCASECMP],
   dnl multibyte locales. Therefore we use our version always.
   AC_LIBOBJ(strcasecmp)
   gl_PREREQ_STRCASECMP
+  REPLACE_STRCASECMP=1
 ])
 
 AC_DEFUN([gl_FUNC_STRNCASECMP],
 [
   AC_REPLACE_FUNCS(strncasecmp)
-  AC_CHECK_DECLS(strncasecmp)
   if test $ac_cv_func_strncasecmp = no; then
     gl_PREREQ_STRNCASECMP
   fi
+  AC_CHECK_DECLS(strncasecmp)
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
 ])
 
 # Prerequisites of lib/strcasecmp.c.
index 8492b9f174a24435c8bacc3c6212d18eb932f43a..e778d51c7fbf75a78e88172cc350f53a3eee8943 100644 (file)
@@ -1,5 +1,5 @@
-# strchrnul.m4 serial 3
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# strchrnul.m4 serial 4
+dnl Copyright (C) 2003, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_STRCHRNUL],
 
   AC_REPLACE_FUNCS(strchrnul)
   if test $ac_cv_func_strchrnul = no; then
+    HAVE_STRCHRNUL=0
     gl_PREREQ_STRCHRNUL
   fi
 ])
index f7786e944bd513c60ccd518652127e4b887637c6..bb38f25ac4d1262fd18df2dbff008e37c1bbd59b 100644 (file)
@@ -1,5 +1,8 @@
-# strdup.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# strdup.m4 serial 8
+
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+dnl Foundation, Inc.
+
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +11,9 @@ AC_DEFUN([gl_FUNC_STRDUP],
 [
   AC_REPLACE_FUNCS(strdup)
   AC_CHECK_DECLS_ONCE(strdup)
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
   gl_PREREQ_STRDUP
 ])
 
diff --git a/m4/string_h.m4 b/m4/string_h.m4
new file mode 100644 (file)
index 0000000..91e5c67
--- /dev/null
@@ -0,0 +1,41 @@
+# Configure a GNU-like replacement for <string.h>.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_HEADER_STRING_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  gl_ABSOLUTE_HEADER([string.h])
+  ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
+  AC_SUBST([ABSOLUTE_STRING_H])
+
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_MEMMEM=1;          AC_SUBST([HAVE_DECL_MEMMEM])
+  HAVE_MEMPCPY=1;              AC_SUBST([HAVE_MEMPCPY])
+  HAVE_DECL_MEMRCHR=1;         AC_SUBST([HAVE_DECL_MEMRCHR])
+  HAVE_STPCPY=1;               AC_SUBST([HAVE_STPCPY])
+  HAVE_STPNCPY=1;              AC_SUBST([HAVE_STPNCPY])
+  HAVE_DECL_STRNCASECMP=1;     AC_SUBST([HAVE_DECL_STRNCASECMP])
+  HAVE_STRCHRNUL=1;            AC_SUBST([HAVE_STRCHRNUL])
+  HAVE_DECL_STRDUP=1;          AC_SUBST([HAVE_DECL_STRDUP])
+  HAVE_STRNDUP=1;              AC_SUBST([HAVE_STRNDUP])
+  HAVE_DECL_STRNDUP=1;         AC_SUBST([HAVE_DECL_STRNDUP])
+  HAVE_DECL_STRNLEN=1;         AC_SUBST([HAVE_DECL_STRNLEN])
+  HAVE_STRPBRK=1;              AC_SUBST([HAVE_STRPBRK])
+  HAVE_STRSEP=1;               AC_SUBST([HAVE_STRSEP])
+  HAVE_DECL_STRTOK_R=1;                AC_SUBST([HAVE_DECL_STRTOK_R])
+  REPLACE_STRCASECMP=0;                AC_SUBST([REPLACE_STRCASECMP])
+  REPLACE_STRSTR=0;            AC_SUBST([REPLACE_STRSTR])
+])
index dd5780b6350859e6c151fa86f61525e65670ca33..d421caebb15c5a40825dba16dcb7cde1f737ae6a 100644 (file)
@@ -1,5 +1,5 @@
-# strndup.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
+# strndup.m4 serial 12
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,9 @@ AC_DEFUN([gl_FUNC_STRNDUP],
   AC_REQUIRE([AC_GNU_SOURCE])
 
   AC_CHECK_DECLS_ONCE([strndup])
+  if test $ac_cv_have_decl_strndup = no; then
+    HAVE_DECL_STRNDUP=0
+  fi
 
   # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
   AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup,
@@ -39,6 +42,7 @@ AC_DEFUN([gl_FUNC_STRNDUP],
     AC_DEFINE([HAVE_STRNDUP], 1,
       [Define if you have the strndup() function and it works.])
   else
+    HAVE_STRNDUP=0
     AC_LIBOBJ([strndup])
     gl_PREREQ_STRNDUP
   fi
index 0213a8ae35ae2c89fa11b5feef274a181e6a085e..e7228834714fa447cd9ba63aa58edc6997aa4046 100644 (file)
@@ -1,5 +1,5 @@
-# strnlen.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005, 2006 Free Software Foundation, Inc.
+# strnlen.m4 serial 7
+dnl Copyright (C) 2002-2003, 2005, 2006, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,11 @@ AC_DEFUN([gl_FUNC_STRNLEN],
   dnl Persuade glibc <string.h> to declare strnlen().
   AC_REQUIRE([AC_GNU_SOURCE])
 
+  AC_CHECK_DECLS_ONCE([strnlen])
+  if test $ac_cv_have_decl_strnlen = no; then
+    HAVE_DECL_STRNLEN=0
+  fi
+
   AC_FUNC_STRNLEN
   if test $ac_cv_func_strnlen_working = no; then
     # This is necessary because automake-1.6.1 doens't understand
@@ -22,6 +27,4 @@ AC_DEFUN([gl_FUNC_STRNLEN],
 ])
 
 # Prerequisites of lib/strnlen.c.
-AC_DEFUN([gl_PREREQ_STRNLEN], [
-  AC_CHECK_DECLS_ONCE(strnlen)
-])
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])
index 68360684eeef77885ea6f7bc9bff63d954beb8ee..80f71d49f880a791c5e50d0151fb9e8f47a8962c 100644 (file)
@@ -1,5 +1,5 @@
-# strpbrk.m4 serial 2
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# strpbrk.m4 serial 3
+dnl Copyright (C) 2002-2003, 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,7 @@ AC_DEFUN([gl_FUNC_STRPBRK],
 [
   AC_REPLACE_FUNCS(strpbrk)
   if test $ac_cv_func_strpbrk = no; then
+    HAVE_STRPBRK=0
     gl_PREREQ_STRPBRK
   fi
 ])
index 40a087b3d29a26e8661594e6699e54ad3dec2d6f..a1a624b567fad4ef1b8e95dffa018cd70b857af7 100644 (file)
@@ -1,5 +1,5 @@
-# strsep.m4 serial 3
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# strsep.m4 serial 4
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,10 @@ AC_DEFUN([gl_FUNC_STRSEP],
   AC_REQUIRE([AC_GNU_SOURCE])
 
   AC_REPLACE_FUNCS(strsep)
-  gl_PREREQ_STRSEP
+  if test $ac_cv_func_strsep = no; then
+    HAVE_STRSEP=0
+    gl_PREREQ_STRSEP
+  fi
 ])
 
 # Prerequisites of lib/strsep.c.
index a785d42866b1960b99e7d95bc7418d8719abb2e2..3639131c71618f1821b86d6933c2177c7b696e96 100644 (file)
@@ -10,6 +10,7 @@ AC_DEFUN([gl_FUNC_STRSTR],
   dnl multibyte locales. Therefore we use our version always.
   AC_LIBOBJ(strstr)
   gl_PREREQ_STRSTR
+  REPLACE_STRSTR=1
 ])
 
 # Prerequisites of lib/strstr.c.
index 332701cc51d93ba7fd82ded78310f71ef4bab4cb..c18dc58774d5fac27b0cf2f8e3a6578270e5fb8f 100644 (file)
@@ -1,5 +1,5 @@
-# strtok_r.m4 serial 3
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# strtok_r.m4 serial 4
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,10 +8,13 @@ AC_DEFUN([gl_FUNC_STRTOK_R],
 [
   AC_REPLACE_FUNCS(strtok_r)
   AC_CHECK_DECLS_ONCE(strtok_r)
+  if test $ac_cv_have_decl_strtok_r = no; then
+    HAVE_DECL_STRTOK_R=0
+  fi
   gl_PREREQ_STRTOK_R
 ])
 
-# Prerequisites of lib/strtok_r.h and lib/strtok_r.c.
+# Prerequisites of lib/strtok_r.c.
 AC_DEFUN([gl_PREREQ_STRTOK_R], [
   AC_REQUIRE([AC_C_RESTRICT])
 ])
index a6b7b93ea4aba853da5616e281df09c963ec015f..2e8b29838af4bd71a60d1bd62e78f01362e328ec 100644 (file)
@@ -2,11 +2,11 @@ Description:
 memmem() function: locate first substring in a buffer.
 
 Files:
-lib/memmem.h
 lib/memmem.c
 m4/memmem.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_MEMMEM
@@ -14,7 +14,7 @@ gl_FUNC_MEMMEM
 Makefile.am:
 
 Include:
-"memmem.h"
+<string.h>
 
 License:
 LGPL
index da13ec831eb7b1b7244e41d60b25ec27bd709a8a..fc093deb3cd39690fb504bb087c103b86aef24db 100644 (file)
@@ -2,11 +2,11 @@ Description:
 mempcpy() function: copy memory area, return point after last written byte.
 
 Files:
-lib/mempcpy.h
 lib/mempcpy.c
 m4/mempcpy.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_MEMPCPY
@@ -14,7 +14,7 @@ gl_FUNC_MEMPCPY
 Makefile.am:
 
 Include:
-"mempcpy.h"
+<string.h>
 
 License:
 LGPL
index 618c389517c5422e6ca25a3d8f40ce59b22e8458..039b1325d5511b82aed54fd1327f5488efc4f808 100644 (file)
@@ -3,10 +3,10 @@ memrchr() function: scan memory for a byte, from the right end.
 
 Files:
 lib/memrchr.c
-lib/memrchr.h
 m4/memrchr.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_MEMRCHR
@@ -14,7 +14,7 @@ gl_FUNC_MEMRCHR
 Makefile.am:
 
 Include:
-"memrchr.h"
+<string.h>
 
 License:
 LGPL
index 13a74df1fd7c21aa5a4d39b5604afecd26b38f3c..d30c1cf6f72837ff8e4640e11414aec06eaa9c9e 100644 (file)
@@ -2,11 +2,11 @@ Description:
 stpcpy() function: copy a string, returning a pointer to its end.
 
 Files:
-lib/stpcpy.h
 lib/stpcpy.c
 m4/stpcpy.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STPCPY
@@ -14,11 +14,10 @@ gl_FUNC_STPCPY
 Makefile.am:
 
 Include:
-"stpcpy.h"
+<string.h>
 
 License:
 LGPL
 
 Maintainer:
 Bruno Haible, glibc
-
index 78f72a4b569f12dc40a43e73f1e5620c54e9fb7a..87847103d7533d2fd28f959bc3b06246265a7358 100644 (file)
@@ -2,11 +2,11 @@ Description:
 stpncpy() function: copy a size-bounded string, returning a pointer to its end.
 
 Files:
-lib/stpncpy.h
 lib/stpncpy.c
 m4/stpncpy.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STPNCPY
@@ -14,11 +14,10 @@ gl_FUNC_STPNCPY
 Makefile.am:
 
 Include:
-"stpncpy.h"
+<string.h>
 
 License:
 LGPL
 
 Maintainer:
 Bruno Haible, glibc
-
index 7d5c026c1d5202c3175910e21acaa85505d87f94..05c1c921c3155a41070f7a1ea598658a09552d70 100644 (file)
@@ -2,7 +2,6 @@ Description:
 Case-insensitive string comparison functions.
 
 Files:
-lib/strcase.h
 lib/strcasecmp.c
 lib/strncasecmp.c
 m4/strcase.m4
@@ -10,6 +9,7 @@ m4/mbrtowc.m4
 
 Depends-on:
 mbuiter
+string
 
 configure.ac:
 gl_STRCASE
@@ -17,11 +17,10 @@ gl_STRCASE
 Makefile.am:
 
 Include:
-"strcase.h"
+<string.h>
 
 License:
 LGPL
 
 Maintainer:
 Bruno Haible
-
index 4cd869826047c14621f874405afb96f7dc67e927..ee2307ac3d76fc63b724169aabef6848c616dd15 100644 (file)
@@ -2,11 +2,11 @@ Description:
 strchrnul(): Find the first occurrence of C in S or the final NUL byte.
 
 Files:
-lib/strchrnul.h
 lib/strchrnul.c
 m4/strchrnul.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STRCHRNUL
@@ -14,7 +14,7 @@ gl_FUNC_STRCHRNUL
 Makefile.am:
 
 Include:
-"strchrnul.h"
+<string.h>
 
 License:
 LGPL
index a42129962a832a5cee905bf9e089c84baa09f7a4..e267a68a3a56569aaa45012cbdad76f3f8918af9 100644 (file)
@@ -2,11 +2,11 @@ Description:
 strdup() function: duplicate a string.
 
 Files:
-lib/strdup.h
 lib/strdup.c
 m4/strdup.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STRDUP
@@ -14,7 +14,7 @@ gl_FUNC_STRDUP
 Makefile.am:
 
 Include:
-"strdup.h"
+<string.h>
 
 License:
 LGPL
diff --git a/modules/string b/modules/string
new file mode 100644 (file)
index 0000000..54a5498
--- /dev/null
@@ -0,0 +1,52 @@
+Description:
+A GNU-like <string.h>.
+
+Files:
+lib/string_.h
+m4/string_h.m4
+
+Depends-on:
+absolute-header
+extensions
+
+configure.ac:
+gl_HEADER_STRING_H
+
+Makefile.am:
+BUILT_SOURCES += string.h
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \
+             -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+             -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+             -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+             -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+             -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+             -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+             -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+             -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+             -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+             -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+             -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+             -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+             -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+             -e 's|@''REPLACE_STRCASECMP''@|$(REPLACE_STRCASECMP)|g' \
+             -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+             < $(srcdir)/string_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += string.h string.h-t
+
+Include:
+#include <string.h>
+
+License:
+LGPL
+
+Maintainer:
+all
index 6b434ec1a4bd6ae52505d79876dfaf51316aa6c3..7246e0af086622590ce79fa614f6d87e638f157b 100644 (file)
@@ -2,11 +2,11 @@ Description:
 strndup() function: duplicate a size-bounded string.
 
 Files:
-lib/strndup.h
 lib/strndup.c
 m4/strndup.m4
 
 Depends-on:
+string
 strnlen
 
 configure.ac:
@@ -15,7 +15,7 @@ gl_FUNC_STRNDUP
 Makefile.am:
 
 Include:
-"strndup.h"
+<string.h>
 
 License:
 LGPL
index 74f4c1af41b1b21778dbb5d3dc1f60b6531d1fe1..56f20512b064cce724ee3fe6eeffcd67d6e31d4f 100644 (file)
@@ -2,12 +2,12 @@ Description:
 strnlen() function: determine the length of a size-bounded string.
 
 Files:
-lib/strnlen.h
 lib/strnlen.c
 m4/strnlen.m4
 
 Depends-on:
 extensions
+string
 
 configure.ac:
 gl_FUNC_STRNLEN
@@ -15,7 +15,7 @@ gl_FUNC_STRNLEN
 Makefile.am:
 
 Include:
-"strnlen.h"
+<string.h>
 
 License:
 LGPL
index bad245443c72621c88db993c7f90d94a95eb356c..1222c00b942b5b29a99aac3db235faf0632546f1 100644 (file)
@@ -2,11 +2,11 @@ Description:
 strpbrk() function: search a string for any of a set of characters.
 
 Files:
-lib/strpbrk.h
 lib/strpbrk.c
 m4/strpbrk.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STRPBRK
@@ -14,11 +14,10 @@ gl_FUNC_STRPBRK
 Makefile.am:
 
 Include:
-"strpbrk.h"
+<string.h>
 
 License:
 LGPL
 
 Maintainer:
 Bruno Haible, glibc
-
index 4fd75a007bbc1e142e985fb0e30309212b5f36e0..3510fbacaf7b6fd5b43d629af9b72ac0b76e5a8d 100644 (file)
@@ -2,11 +2,11 @@ Description:
 strsep() function: extract token from string.
 
 Files:
-lib/strsep.h
 lib/strsep.c
 m4/strsep.m4
 
 Depends-on:
+string
 strpbrk
 
 configure.ac:
@@ -15,7 +15,7 @@ gl_FUNC_STRSEP
 Makefile.am:
 
 Include:
-"strsep.h"
+<string.h>
 
 License:
 LGPL
index 58678726992c274a51dd8b00e7ce245a9f0f4644..f4868a4f567d9f73c21411630a11732b6a974c5b 100644 (file)
@@ -2,13 +2,13 @@ Description:
 strstr() function: search for a substring in a string.
 
 Files:
-lib/strstr.h
 lib/strstr.c
 m4/strstr.m4
 m4/mbrtowc.m4
 
 Depends-on:
 mbuiter
+string
 
 configure.ac:
 gl_FUNC_STRSTR
@@ -16,11 +16,10 @@ gl_FUNC_STRSTR
 Makefile.am:
 
 Include:
-"strstr.h"
+<string.h>
 
 License:
 LGPL
 
 Maintainer:
 Bruno Haible, glibc
-
index 508b79d326cb4e8f70db659255c70100bbe3a28c..e5691d483aed57d1c224f53d36724ff052ecdcec 100644 (file)
@@ -3,10 +3,10 @@ strtok_r() function: split string into tokens, thread safe.
 
 Files:
 lib/strtok_r.c
-lib/strtok_r.h
 m4/strtok_r.m4
 
 Depends-on:
+string
 
 configure.ac:
 gl_FUNC_STRTOK_R
@@ -14,7 +14,7 @@ gl_FUNC_STRTOK_R
 Makefile.am:
 
 Include:
-"strtok_r.h"
+<string.h>
 
 License:
 LGPL
index 20279d2a8bfb0382bf4f6438b1f3ab96f047fb2c..eace24e87e201b76e5d05640e307c905cebb265b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the gnulib dirname module.
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "strdup.h"
-
 const char *program_name = "test-dirname";
 
 struct test {
index a2240fa3a42ca36a699b6d830e8abb0810f5fc3e..2308bbb5438ea733e12b96b247d60ff441a7e84e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004 Free Software Foundation
+ * Copyright (C) 2004, 2007 Free Software Foundation
  * Written by Simon Josefsson
  *
  * This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "memmem.h"
 
 int
 main (int argc, char *argv[])