diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-01-26 22:16:55 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2007-01-26 22:16:55 +0000 |
commit | 1e4ece4ab9850fbfa88c9ec43ea518c7bc266792 (patch) | |
tree | 2358a3115304ff44d1e5a77c14eb6a18fdfc7da7 /modules | |
parent | 00da503f0eb41eae7b4bcfd2c539faf50d946695 (diff) | |
download | gnulib-1e4ece4ab9850fbfa88c9ec43ea518c7bc266792.tar.gz |
* 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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/memmem | 4 | ||||
-rw-r--r-- | modules/mempcpy | 4 | ||||
-rw-r--r-- | modules/memrchr | 4 | ||||
-rw-r--r-- | modules/stpcpy | 5 | ||||
-rw-r--r-- | modules/stpncpy | 5 | ||||
-rw-r--r-- | modules/strcase | 5 | ||||
-rw-r--r-- | modules/strchrnul | 4 | ||||
-rw-r--r-- | modules/strdup | 4 | ||||
-rw-r--r-- | modules/string | 52 | ||||
-rw-r--r-- | modules/strndup | 4 | ||||
-rw-r--r-- | modules/strnlen | 4 | ||||
-rw-r--r-- | modules/strpbrk | 5 | ||||
-rw-r--r-- | modules/strsep | 4 | ||||
-rw-r--r-- | modules/strstr | 5 | ||||
-rw-r--r-- | modules/strtok_r | 4 |
15 files changed, 80 insertions, 33 deletions
diff --git a/modules/memmem b/modules/memmem index a6b7b93ea4..2e8b29838a 100644 --- a/modules/memmem +++ b/modules/memmem @@ -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 diff --git a/modules/mempcpy b/modules/mempcpy index da13ec831e..fc093deb3c 100644 --- a/modules/mempcpy +++ b/modules/mempcpy @@ -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 diff --git a/modules/memrchr b/modules/memrchr index 618c389517..039b1325d5 100644 --- a/modules/memrchr +++ b/modules/memrchr @@ -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 diff --git a/modules/stpcpy b/modules/stpcpy index 13a74df1fd..d30c1cf6f7 100644 --- a/modules/stpcpy +++ b/modules/stpcpy @@ -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 - diff --git a/modules/stpncpy b/modules/stpncpy index 78f72a4b56..87847103d7 100644 --- a/modules/stpncpy +++ b/modules/stpncpy @@ -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 - diff --git a/modules/strcase b/modules/strcase index 7d5c026c1d..05c1c921c3 100644 --- a/modules/strcase +++ b/modules/strcase @@ -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 - diff --git a/modules/strchrnul b/modules/strchrnul index 4cd8698260..ee2307ac3d 100644 --- a/modules/strchrnul +++ b/modules/strchrnul @@ -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 diff --git a/modules/strdup b/modules/strdup index a42129962a..e267a68a3a 100644 --- a/modules/strdup +++ b/modules/strdup @@ -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 index 0000000000..54a5498e2c --- /dev/null +++ b/modules/string @@ -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 diff --git a/modules/strndup b/modules/strndup index 6b434ec1a4..7246e0af08 100644 --- a/modules/strndup +++ b/modules/strndup @@ -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 diff --git a/modules/strnlen b/modules/strnlen index 74f4c1af41..56f20512b0 100644 --- a/modules/strnlen +++ b/modules/strnlen @@ -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 diff --git a/modules/strpbrk b/modules/strpbrk index bad245443c..1222c00b94 100644 --- a/modules/strpbrk +++ b/modules/strpbrk @@ -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 - diff --git a/modules/strsep b/modules/strsep index 4fd75a007b..3510fbacaf 100644 --- a/modules/strsep +++ b/modules/strsep @@ -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 diff --git a/modules/strstr b/modules/strstr index 5867872699..f4868a4f56 100644 --- a/modules/strstr +++ b/modules/strstr @@ -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 - diff --git a/modules/strtok_r b/modules/strtok_r index 508b79d326..e5691d483a 100644 --- a/modules/strtok_r +++ b/modules/strtok_r @@ -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 |