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

strchrnul: work around cygwin bug

A misplaced * means that cygwin 1.7.9 dereferences NULL rather
than returning the location of the trailing NUL byte.

* doc/glibc-functions/strchrnul.texi (strchrnul): Document bug.
* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Detect it.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New witness.
* modules/string (Makefile.am): Substitute it.
* lib/string.in.h (strchrnul): Use it.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake
2011-04-15 13:53:50 -06:00
parent 61a6a26974
commit 2aa729ac6a
6 changed files with 64 additions and 6 deletions

View File

@@ -87,6 +87,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \