summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-04-29 11:28:18 +0200
committerSimon Josefsson <simon@josefsson.org>2008-04-29 11:28:18 +0200
commit3cbf5e98e1a0a894f0708ed37414fd863d8c383e (patch)
tree616b2a1a6ba3d264169c31fb3b01111f6002a47a
parent0c7756d591a02c0060ef1543fbcdacae5aa5e10b (diff)
downloadgnutls-3cbf5e98e1a0a894f0708ed37414fd863d8c383e.tar.gz
Update gnulib files.
-rw-r--r--gl/gnulib.mk2
-rw-r--r--gl/m4/arpa_inet_h.m43
-rw-r--r--lgl/Makefile.am4
-rw-r--r--lgl/m4/stdlib_h.m44
-rw-r--r--lgl/m4/string_h.m42
-rw-r--r--lgl/stdlib.in.h15
-rw-r--r--lgl/string.in.h16
7 files changed, 45 insertions, 1 deletions
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index f3808b3a87..2533fbe417 100644
--- a/gl/gnulib.mk
+++ b/gl/gnulib.mk
@@ -35,6 +35,8 @@ arpa/inet.h:
sed \
-e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
-e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
+ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
+ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
< $(srcdir)/arpa_inet.in.h; \
} > $@-t
mv $@-t $@
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 8f530c5e7a..baddf0da72 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -32,4 +32,7 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
[
GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP])
GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
+ HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
])
diff --git a/lgl/Makefile.am b/lgl/Makefile.am
index c5ae53fd34..a17143bd77 100644
--- a/lgl/Makefile.am
+++ b/lgl/Makefile.am
@@ -457,6 +457,7 @@ stdlib.h: stdlib.in.h
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
@@ -465,6 +466,7 @@ stdlib.h: stdlib.in.h
-e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
-e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
@@ -510,6 +512,7 @@ string.h: string.in.h
-e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
-e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
-e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|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' \
@@ -526,6 +529,7 @@ string.h: string.in.h
-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_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' \
diff --git a/lgl/m4/stdlib_h.m4 b/lgl/m4/stdlib_h.m4
index d9240b46a0..95e679f797 100644
--- a/lgl/m4/stdlib_h.m4
+++ b/lgl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 6
+# stdlib_h.m4 serial 7
dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -26,6 +26,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
@@ -35,6 +36,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
+ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
diff --git a/lgl/m4/string_h.m4 b/lgl/m4/string_h.m4
index 766d7e9849..7143690ebf 100644
--- a/lgl/m4/string_h.m4
+++ b/lgl/m4/string_h.m4
@@ -35,6 +35,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
@@ -66,6 +67,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
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_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
diff --git a/lgl/stdlib.in.h b/lgl/stdlib.in.h
index 318a206eb5..fc6004c131 100644
--- a/lgl/stdlib.in.h
+++ b/lgl/stdlib.in.h
@@ -176,6 +176,21 @@ extern int putenv (char *string);
#endif
+#if @GNULIB_RPMATCH@
+# if !@HAVE_RPMATCH@
+/* Test a user response to a question.
+ Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
+extern int rpmatch (const char *response);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rpmatch
+# define rpmatch(r) \
+ (GL_LINK_WARNING ("rpmatch is unportable - " \
+ "use gnulib module rpmatch for portability"), \
+ rpmatch (r))
+#endif
+
+
#if @GNULIB_SETENV@
# if !@HAVE_SETENV@
/* Set NAME to VALUE in the environment.
diff --git a/lgl/string.in.h b/lgl/string.in.h
index b10a491438..e1086ca32c 100644
--- a/lgl/string.in.h
+++ b/lgl/string.in.h
@@ -93,6 +93,22 @@ extern void *memrchr (void const *, int, size_t)
memrchr (a, b, c))
#endif
+/* Find the first occurrence of C in S. More efficient than
+ memchr(S,C,N), at the expense of undefined behavior if C does not
+ occur within N bytes. */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+extern void *rawmemchr (void const *__s, int __c_in)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# define rawmemchr(a,b) \
+ (GL_LINK_WARNING ("rawmemchr is unportable - " \
+ "use gnulib module rawmemchr for portability"), \
+ rawmemchr (a, b))
+#endif
+
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
#if @GNULIB_STPCPY@
# if ! @HAVE_STPCPY@