1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

Rename module string to string-h.

* modules/string-h: Renamed from modules/string.
* modules/string-h-tests: Renamed from modules/string-tests.
* modules/string-h-c++-tests: Renamed from modules/string-c++-tests.
* tests/test-string-h.c: Renamed from tests/test-string.c.
* tests/test-string-h-c++.cc: Renamed from tests/test-string-c++.cc.
* tests/test-string-h-c++2.cc: Renamed from tests/test-string-c++2.cc.
* doc/posix-headers/string.texi: Update.
* doc/posix-functions/strcat.texi: Update.
* doc/posix-functions/strcpy.texi: Update.
* doc/posix-functions/strncpy.texi: Update.
* modules/* (Depends-on): Update.
* modules/string: New file.
This commit is contained in:
Bruno Haible
2024-12-27 23:37:59 +01:00
parent 4da657e525
commit d93e96eb60
71 changed files with 267 additions and 226 deletions

View File

@@ -1,3 +1,19 @@
2024-12-27 Bruno Haible <bruno@clisp.org>
Rename module string to string-h.
* modules/string-h: Renamed from modules/string.
* modules/string-h-tests: Renamed from modules/string-tests.
* modules/string-h-c++-tests: Renamed from modules/string-c++-tests.
* tests/test-string-h.c: Renamed from tests/test-string.c.
* tests/test-string-h-c++.cc: Renamed from tests/test-string-c++.cc.
* tests/test-string-h-c++2.cc: Renamed from tests/test-string-c++2.cc.
* doc/posix-headers/string.texi: Update.
* doc/posix-functions/strcat.texi: Update.
* doc/posix-functions/strcpy.texi: Update.
* doc/posix-functions/strncpy.texi: Update.
* modules/* (Depends-on): Update.
* modules/string: New file.
2024-12-27 Bruno Haible <bruno@clisp.org>
Rename module stdnoreturn to stdnoreturn-h.

View File

@@ -4,8 +4,8 @@
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/strcat.html}
Gnulib module: string
@mindex string
Gnulib module: string-h
@mindex string-h
Portability problems fixed by Gnulib:
@itemize

View File

@@ -4,8 +4,8 @@
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/strcpy.html}
Gnulib module: string
@mindex string
Gnulib module: string-h
@mindex string-h
Portability problems fixed by Gnulib:
@itemize

View File

@@ -4,11 +4,11 @@
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/strncpy.html}
Gnulib module: string or strncpy
@mindex string
Gnulib module: string-h or strncpy
@mindex string-h
@mindex strncpy
Portability problems fixed by Gnulib module @code{string} or Gnulib module @code{strncpy}:
Portability problems fixed by Gnulib module @code{string-h} or Gnulib module @code{strncpy}:
@itemize
@item
This function cannot be called from plain inline or extern inline functions

View File

@@ -3,8 +3,8 @@
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/string.h.html}
Gnulib module: string
@mindex string
Gnulib module: string-h
@mindex string-h
Portability problems fixed by Gnulib:
@itemize

View File

@@ -30,7 +30,7 @@ stddef-h
stdint-h
stdio-h
stdlib-h
string
string-h
uchar
# The lonesome_lower array requires ISO C 23 semantics for char32_t.
# But uchar-c23 has a global effect, therefore leave it to each package

View File

@@ -8,7 +8,7 @@ Depends-on:
binary-io
stdio-h
stdlib-h
string
string-h
unistd
regex
setlocale

View File

@@ -8,7 +8,7 @@ m4/explicit_bzero.m4
Depends-on:
extensions
memset_explicit
string
string-h
configure.ac:
gl_FUNC_EXPLICIT_BZERO

View File

@@ -8,7 +8,7 @@ m4/ffsl.m4
Depends-on:
extensions
string
string-h
ffs [test $HAVE_FFSL = 0]
configure.ac:

View File

@@ -8,7 +8,7 @@ m4/ffsll.m4
Depends-on:
extensions
string
string-h
ffs [test $HAVE_FFSLL = 0 || test $REPLACE_FFSLL = 1]
configure.ac:

View File

@@ -7,7 +7,7 @@ m4/free.m4
Depends-on:
stdlib-h
string
string-h
wchar
configure.ac:

View File

@@ -2,7 +2,7 @@ Files:
tests/test-getprogname.c
Depends-on:
string
string-h
configure.ac:

View File

@@ -8,7 +8,7 @@ Depends-on:
c32tolower
mbuiterf [test "$GNULIB_MCEL_PREFER" != yes]
stdlib-h
string
string-h
uchar
configure.ac:

View File

@@ -9,7 +9,7 @@ Depends-on:
alignasof
mbuiter
stdbool-h
string
string-h
mbslen
malloca
c32tolower

View File

@@ -6,7 +6,7 @@ lib/mbschr.c
Depends-on:
mbuiterf
string
string-h
configure.ac:
gl_STRING_MODULE_INDICATOR([mbschr])

View File

@@ -6,7 +6,7 @@ lib/mbscspn.c
Depends-on:
mbuiterf
string
string-h
mbschr
strcspn

View File

@@ -7,7 +7,7 @@ m4/mbslen.m4
Depends-on:
mbuiterf
string
string-h
configure.ac:
gl_FUNC_MBSLEN

View File

@@ -7,7 +7,7 @@ lib/mbsncasecmp.c
Depends-on:
c32tolower
mbuiterf
string
string-h
configure.ac:
gl_STRING_MODULE_INDICATOR([mbsncasecmp])

View File

@@ -6,7 +6,7 @@ lib/mbsnlen.c
Depends-on:
mbiterf
string
string-h
configure.ac:
gl_STRING_MODULE_INDICATOR([mbsnlen])

View File

@@ -6,7 +6,7 @@ lib/mbspbrk.c
Depends-on:
mbuiterf
string
string-h
mbschr
strpbrk

View File

@@ -7,7 +7,7 @@ lib/mbspcasecmp.c
Depends-on:
c32tolower
mbuiterf
string
string-h
configure.ac:
gl_STRING_MODULE_INDICATOR([mbspcasecmp])

View File

@@ -6,7 +6,7 @@ lib/mbsrchr.c
Depends-on:
mbuiterf
string
string-h
configure.ac:
gl_STRING_MODULE_INDICATOR([mbsrchr])

View File

@@ -6,7 +6,7 @@ lib/mbssep.c
Depends-on:
mbuiterf
string
string-h
mbspbrk
strsep

View File

@@ -6,7 +6,7 @@ lib/mbsspn.c
Depends-on:
mbuiterf
string
string-h
mbschr
configure.ac:

View File

@@ -9,7 +9,7 @@ Depends-on:
alignasof
mbuiter
stdbool-h
string
string-h
mbslen
malloca
strnlen

View File

@@ -5,7 +5,7 @@ Files:
lib/mbstok_r.c
Depends-on:
string
string-h
mbsspn
mbspbrk
strtok_r

View File

@@ -9,7 +9,7 @@ m4/mmap-anon.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_MEMCHR

View File

@@ -12,7 +12,7 @@ lib/memcpy.c
m4/memcpy.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_MEMCPY

View File

@@ -9,7 +9,7 @@ m4/memmem.m4
Depends-on:
builtin-expect
extensions
string
string-h
stdint-h
memchr
memcmp

View File

@@ -12,7 +12,7 @@ lib/memmove.c
m4/memmove.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_MEMMOVE

View File

@@ -7,7 +7,7 @@ m4/mempcpy.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_MEMPCPY

View File

@@ -7,7 +7,7 @@ m4/memrchr.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_MEMRCHR

View File

@@ -12,7 +12,7 @@ lib/memset.c
m4/memset.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_MEMSET

View File

@@ -6,7 +6,7 @@ lib/memset_explicit.c
m4/memset_explicit.m4
Depends-on:
string
string-h
extensions
configure.ac:

View File

@@ -30,7 +30,7 @@ signal-h
spawn-h
stdio-h
stdlib-h
string
string-h
strings
sys_file
sys_ioctl

View File

@@ -10,7 +10,7 @@ Depends-on:
assert-h
extensions
stdint-h
string
string-h
configure.ac:
gl_FUNC_RAWMEMCHR

View File

@@ -74,7 +74,7 @@ stddef-h
stdckdint-h
stdint-h
stdlib-h
string
string-h
sys_stat
unistd
xalloc-oversized

View File

@@ -7,7 +7,7 @@ m4/sigabbrev_np.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_SIGABBREV_NP

View File

@@ -7,7 +7,7 @@ m4/sigdescr_np.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_SIGDESCR_NP

View File

@@ -1,6 +1,6 @@
Description:
POSIX compatible snprintf() function: print formatted output to a fixed length
string
string-h
Comment:
This module should not be used as a dependency from a test module,

View File

@@ -3,7 +3,7 @@ tests/test-stack.c
tests/macros.h
Depends-on:
string
string-h
configure.ac:

View File

@@ -7,7 +7,7 @@ m4/stpcpy.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_STPCPY

View File

@@ -7,7 +7,7 @@ m4/stpncpy.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_STPNCPY

View File

@@ -7,7 +7,7 @@ lib/str-two-way.h
m4/strcasestr.m4
Depends-on:
string
string-h
stdbool-h
strcase
memchr

View File

@@ -8,7 +8,7 @@ lib/strchrnul.valgrind
m4/strchrnul.m4
Depends-on:
string
string-h
extensions
rawmemchr [test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1]

View File

@@ -11,7 +11,7 @@ Files:
m4/strdup.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_STRDUP

View File

@@ -6,7 +6,7 @@ lib/strdup.c
m4/strdup.m4
Depends-on:
string
string-h
malloc-posix [test $REPLACE_STRDUP = 1]
configure.ac:

View File

@@ -6,7 +6,7 @@ lib/strerror.c
m4/strerror.m4
Depends-on:
string
string-h
assert-h [test $REPLACE_STRERROR = 1]
errno-h [test $REPLACE_STRERROR = 1]
intprops [test $REPLACE_STRERROR = 1]

View File

@@ -6,7 +6,7 @@ lib/strerror_r.c
m4/strerror_r.m4
Depends-on:
string
string-h
extensions
errno-h [test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1]
lock [test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1]

View File

@@ -7,7 +7,7 @@ m4/strerrorname_np.m4
Depends-on:
extensions
string
string-h
configure.ac:
gl_FUNC_STRERRORNAME_NP

View File

@@ -1,140 +1,20 @@
Description:
A GNU-like <string.h>.
Status:
deprecated
Notice:
This module is deprecated. Use the module 'string-h' instead.
Files:
lib/string.in.h
m4/string_h.m4
Depends-on:
extensions
extern-inline
gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
stddef-h
stdlib-h
string-h
configure.ac:
gl_STRING_H
gl_STRING_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
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.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_MEMSET_EXPLICIT''@/$(GNULIB_MEMSET_EXPLICIT)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
-e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
-e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
< $(srcdir)/string.in.h > $@-t1
$(AM_V_at)sed \
-e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|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_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|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_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
-e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
-e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
-e 's|@''REPLACE_MEMSET_EXPLICIT''@|$(REPLACE_MEMSET_EXPLICIT)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRVERSCMP''@|$(REPLACE_STRVERSCMP)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $@-t1 > $@-t2
$(AM_V_at)rm -f $@-t1
$(AM_V_at)mv $@-t2 $@
MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2
Include:
<string.h>
@@ -143,4 +23,3 @@ License:
LGPLv2+
Maintainer:
all

View File

@@ -1,20 +0,0 @@
Files:
tests/test-string-c++.cc
tests/test-string-c++2.cc
tests/signature.h
Status:
c++-test
Depends-on:
ansi-c++-opt
configure.ac:
Makefile.am:
if ANSICXX
TESTS += test-string-c++
check_PROGRAMS += test-string-c++
test_string_c___SOURCES = test-string-c++.cc test-string-c++2.cc
test_string_c___LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(LIBC32CONV) $(LIBTHREAD)
endif

146
modules/string-h Normal file
View File

@@ -0,0 +1,146 @@
Description:
A GNU-like <string.h>.
Files:
lib/string.in.h
m4/string_h.m4
Depends-on:
extensions
extern-inline
gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
stddef-h
stdlib-h
configure.ac:
gl_STRING_H
gl_STRING_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
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.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_MEMSET_EXPLICIT''@/$(GNULIB_MEMSET_EXPLICIT)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \
-e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \
-e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
< $(srcdir)/string.in.h > $@-t1
$(AM_V_at)sed \
-e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|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_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|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_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
-e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
-e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
-e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
-e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
-e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
-e 's|@''REPLACE_MEMSET_EXPLICIT''@|$(REPLACE_MEMSET_EXPLICIT)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
-e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRVERSCMP''@|$(REPLACE_STRVERSCMP)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $@-t1 > $@-t2
$(AM_V_at)rm -f $@-t1
$(AM_V_at)mv $@-t2 $@
MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2
Include:
<string.h>
License:
LGPLv2+
Maintainer:
all

View File

@@ -0,0 +1,20 @@
Files:
tests/test-string-h-c++.cc
tests/test-string-h-c++2.cc
tests/signature.h
Status:
c++-test
Depends-on:
ansi-c++-opt
configure.ac:
Makefile.am:
if ANSICXX
TESTS += test-string-h-c++
check_PROGRAMS += test-string-h-c++
test_string_h_c___SOURCES = test-string-h-c++.cc test-string-h-c++2.cc
test_string_h_c___LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(LIBC32CONV) $(LIBTHREAD)
endif

12
modules/string-h-tests Normal file
View File

@@ -0,0 +1,12 @@
Files:
tests/test-string-h.c
Depends-on:
assert-h
string-h-c++-tests
configure.ac:
Makefile.am:
TESTS += test-string-h
check_PROGRAMS += test-string-h

View File

@@ -1,12 +0,0 @@
Files:
tests/test-string.c
Depends-on:
assert-h
string-c++-tests
configure.ac:
Makefile.am:
TESTS += test-string
check_PROGRAMS += test-string

View File

@@ -7,7 +7,7 @@ m4/strncat.m4
m4/mmap-anon.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_STRNCAT

View File

@@ -10,7 +10,7 @@ This module is obsolete.
Files:
Depends-on:
string
string-h
configure.ac:

View File

@@ -6,7 +6,7 @@ lib/strndup.c
m4/strndup.m4
Depends-on:
string
string-h
extensions
strnlen [test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1]

View File

@@ -6,7 +6,7 @@ lib/strnlen.c
m4/strnlen.m4
Depends-on:
string
string-h
extensions
configure.ac:

View File

@@ -12,7 +12,7 @@ lib/strpbrk.c
m4/strpbrk.m4
Depends-on:
string
string-h
configure.ac:
gl_FUNC_STRPBRK

View File

@@ -10,7 +10,7 @@ Depends-on:
time-h
extensions
sys_time [test $HAVE_STRPTIME = 0]
string [test $HAVE_STRPTIME = 0]
string-h [test $HAVE_STRPTIME = 0]
strcase [test $HAVE_STRPTIME = 0]
stdbool-h [test $HAVE_STRPTIME = 0]
time_r [test $HAVE_STRPTIME = 0]

View File

@@ -6,7 +6,7 @@ lib/strsep.c
m4/strsep.m4
Depends-on:
string
string-h
extensions
strpbrk [test $HAVE_STRSEP = 0]

View File

@@ -7,7 +7,7 @@ lib/siglist.h
m4/strsignal.m4
Depends-on:
string
string-h
extensions
gettext-h [test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1]
gnulib-i18n [test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1]

View File

@@ -7,7 +7,7 @@ lib/strstr.c
m4/strstr.m4
Depends-on:
string
string-h
builtin-expect [test $REPLACE_STRSTR = 1]
stdbool-h [test $REPLACE_STRSTR = 1]
memchr [test $REPLACE_STRSTR = 1]

View File

@@ -6,7 +6,7 @@ lib/strtok_r.c
m4/strtok_r.m4
Depends-on:
string
string-h
strpbrk [test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1]
configure.ac:

View File

@@ -9,7 +9,7 @@ Depends-on:
extensions
libc-config [test $HAVE_STRVERSCMP = 0 || test $REPLACE_STRVERSCMP = 1]
stdint-h [test $HAVE_STRVERSCMP = 0 || test $REPLACE_STRVERSCMP = 1]
string
string-h
configure.ac:
gl_FUNC_STRVERSCMP

View File

@@ -1,6 +1,6 @@
Description:
POSIX compatible vsnprintf() function: print formatted output to a fixed length
string
string-h
Comment:
This module should not be used as a dependency from a test module,