summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2007-06-26 09:56:47 +0200
committerSimon Josefsson <simon@josefsson.org>2007-06-26 09:56:47 +0200
commita2169b0b7b255e656e3fea4c48d34ba1b3acbbc1 (patch)
tree6c9b74ca679fdaa26992ec06c90a6a45e01cb49b /gl
parentfdb5649249bda069648369df6eb264737768fa74 (diff)
downloadgnutls-a2169b0b7b255e656e3fea4c48d34ba1b3acbbc1.tar.gz
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/gnulib.mk24
-rw-r--r--gl/m4/absolute-header.m444
-rw-r--r--gl/m4/gnulib-comp.m42
-rw-r--r--gl/m4/include_next.m485
-rw-r--r--gl/m4/netinet_in_h.m46
-rw-r--r--gl/m4/string_h.m44
-rw-r--r--gl/m4/sys_socket_h.m47
-rw-r--r--gl/netinet_in_.h6
-rw-r--r--gl/string_.h6
-rw-r--r--gl/sys_socket_.h6
10 files changed, 102 insertions, 88 deletions
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index 47c97abb68..86d1f3e8ea 100644
--- a/gl/gnulib.mk
+++ b/gl/gnulib.mk
@@ -22,15 +22,6 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
-## begin gnulib module absolute-header
-
-# Use this preprocessor expression to decide whether #include_next works.
-# Do not rely on a 'configure'-time test for this, since the expression
-# might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
-
-## end gnulib module absolute-header
-
## begin gnulib module arpa_inet
BUILT_SOURCES += $(ARPA_INET_H)
@@ -125,8 +116,8 @@ netinet/in.h:
@MKDIR_P@ netinet
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_NETINET_IN_H''@|$(ABSOLUTE_NETINET_IN_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
+ sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
-e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
< $(srcdir)/netinet_in_.h; \
} > $@-t
@@ -189,8 +180,8 @@ BUILT_SOURCES += string.h
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_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
+ sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
-e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
@@ -253,8 +244,8 @@ BUILT_SOURCES += $(SYS_SOCKET_H)
sys/socket.h: sys_socket_.h
@MKDIR_P@ sys
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_SYS_SOCKET_H''@|$(ABSOLUTE_SYS_SOCKET_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
+ sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
-e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
@@ -286,4 +277,5 @@ mostlyclean-local: mostlyclean-generic
if test -n "$$dir" && test -d $$dir; then \
echo "rmdir $$dir"; rmdir $$dir; \
fi; \
- done
+ done; \
+ :
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
deleted file mode 100644
index c649df0840..0000000000
--- a/gl/m4/absolute-header.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-# absolute-header.m4 serial 6
-dnl Copyright (C) 2006 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.
-
-dnl From Derek Price.
-
-# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
-# ---------------------------------------
-# Find the absolute name of a header file, assuming the header exists.
-# If the header were sys/inttypes.h, this macro would define
-# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h
-# in config.h
-# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
-# The three "///" are to pacify Sun C 5.8, which otherwise would say
-# "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
-AC_DEFUN([gl_ABSOLUTE_HEADER],
-[AC_LANG_PREPROC_REQUIRE()dnl
-AC_FOREACH([gl_HEADER_NAME], [$1],
- [AS_VAR_PUSHDEF([gl_absolute_header],
- [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
- m4_quote(m4_defn([gl_absolute_header])),
- [AS_VAR_PUSHDEF([ac_header_exists],
- [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- if test AS_VAR_GET(ac_header_exists) = yes; then
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
-dnl eval is necessary to expand ac_cpp.
-dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
- AS_VAR_SET(gl_absolute_header,
-[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
- fi
- AS_VAR_POPDEF([ac_header_exists])dnl
- ])dnl
- AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
- ["AS_VAR_GET(gl_absolute_header)"],
- [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
- AS_VAR_POPDEF([gl_absolute_header])dnl
-])dnl
-])# gl_ABSOLUTE_HEADER
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 512406418c..a4afc9afbd 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -137,7 +137,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/version-etc-fsf.c
lib/version-etc.c
lib/version-etc.h
- m4/absolute-header.m4
m4/arpa_inet_h.m4
m4/error.m4
m4/extensions.m4
@@ -145,6 +144,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/getdelim.m4
m4/getline.m4
m4/gnulib-common.m4
+ m4/include_next.m4
m4/inet_ntop.m4
m4/inet_pton.m4
m4/lib-ld.m4
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
new file mode 100644
index 0000000000..4dc84c958c
--- /dev/null
+++ b/gl/m4/include_next.m4
@@ -0,0 +1,85 @@
+# include_next.m4 serial 3
+dnl Copyright (C) 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.
+
+dnl From Paul Eggert and Derek Price.
+
+AC_DEFUN([gl_INCLUDE_NEXT],
+[
+ AC_LANG_PREPROC_REQUIRE()
+ AC_CACHE_CHECK([whether the preprocessor supports include_next],
+ [gl_cv_have_include_next],
+ [AC_PREPROC_IFELSE([#include_next <stddef.h>],
+ [gl_cv_have_include_next=yes],
+ [gl_cv_have_include_next=no])])
+ if test $gl_cv_have_include_next = yes; then
+
+ dnl FIXME: Remove HAVE_INCLUDE_NEXT and update everything that uses it
+ dnl to use @INCLUDE_NEXT@ instead.
+ AC_DEFINE([HAVE_INCLUDE_NEXT], 1,
+ [Define if your compiler supports the #include_next directive.])
+
+ INCLUDE_NEXT=include_next
+ else
+ INCLUDE_NEXT=include
+ fi
+ AC_SUBST([INCLUDE_NEXT])
+])
+
+# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------------
+# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
+# '<foo.h>'; otherwise define it to be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# That way, a header file with the following line:
+# #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# behaves (after sed substitution) as if it contained
+# #include_next <foo.h>
+# even if the compiler does not support include_next.
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+AC_DEFUN([gl_CHECK_NEXT_HEADERS],
+[
+ AC_REQUIRE([gl_INCLUDE_NEXT])
+ AC_CHECK_HEADERS_ONCE([$1])
+
+ AC_FOREACH([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_next_header],
+ [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
+ if test $gl_cv_have_include_next = yes; then
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ else
+ AC_CACHE_CHECK(
+ [absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+ m4_quote(m4_defn([gl_next_header])),
+ [AS_VAR_PUSHDEF([gl_header_exists],
+ [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))
+ if test AS_VAR_GET(gl_header_exists) = yes; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE(
+ [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+ )])
+ dnl eval is necessary to expand ac_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{
+ s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'])
+ else
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ AS_VAR_POPDEF([gl_header_exists])])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ [AS_VAR_GET([gl_next_header])])
+ AS_VAR_POPDEF([gl_next_header])])
+])
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index 966bfe6a11..096be740da 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,4 +1,4 @@
-# netinet_in_h.m4 serial 2
+# netinet_in_h.m4 serial 3
dnl Copyright (C) 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,
@@ -18,9 +18,7 @@ AC_DEFUN([gl_HEADER_NETINET_IN],
else
NETINET_IN_H='netinet/in.h'
AC_CHECK_HEADERS([netinet/in.h])
- gl_ABSOLUTE_HEADER([netinet/in.h])
- ABSOLUTE_NETINET_IN_H=\"$gl_cv_absolute_netinet_in_h\"
- AC_SUBST([ABSOLUTE_NETINET_IN_H])
+ gl_CHECK_NEXT_HEADERS([netinet/in.h])
if test $ac_cv_header_netinet_in_h = yes; then
HAVE_NETINET_IN_H=1
else
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index ab5d786988..ec51e9a018 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -18,9 +18,7 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- gl_ABSOLUTE_HEADER([string.h])
- ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
- AC_SUBST([ABSOLUTE_STRING_H])
+ gl_CHECK_NEXT_HEADERS([string.h])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index ce5acf6e24..d9659c2d75 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 3
+# sys_socket_h.m4 serial 4
dnl Copyright (C) 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,
@@ -20,10 +20,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
else
SYS_SOCKET_H='sys/socket.h'
- AC_CHECK_HEADERS([sys/socket.h])
- gl_ABSOLUTE_HEADER([sys/socket.h])
- ABSOLUTE_SYS_SOCKET_H=\"$gl_cv_absolute_sys_socket_h\"
- AC_SUBST([ABSOLUTE_SYS_SOCKET_H])
+ gl_CHECK_NEXT_HEADERS([sys/socket.h])
if test $ac_cv_header_sys_socket_h = yes; then
HAVE_SYS_SOCKET_H=1
HAVE_WINSOCK2_H=0
diff --git a/gl/netinet_in_.h b/gl/netinet_in_.h
index 2585d33e3a..aa00e45ced 100644
--- a/gl/netinet_in_.h
+++ b/gl/netinet_in_.h
@@ -24,11 +24,7 @@
# include <sys/types.h>
/* The include_next requires a split double-inclusion guard. */
-# if @HAVE_INCLUDE_NEXT@
-# include_next <netinet/in.h>
-# else
-# include @ABSOLUTE_NETINET_IN_H@
-# endif
+# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@
#endif
diff --git a/gl/string_.h b/gl/string_.h
index 4dbe66ccc4..bfb22b0ebc 100644
--- a/gl/string_.h
+++ b/gl/string_.h
@@ -19,11 +19,7 @@
#ifndef _GL_STRING_H
/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <string.h>
-#else
-# include @ABSOLUTE_STRING_H@
-#endif
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
#ifndef _GL_STRING_H
#define _GL_STRING_H
diff --git a/gl/sys_socket_.h b/gl/sys_socket_.h
index c7eb649025..c25b6ab842 100644
--- a/gl/sys_socket_.h
+++ b/gl/sys_socket_.h
@@ -30,11 +30,7 @@
# include <sys/types.h>
/* The include_next requires a split double-inclusion guard. */
-# if @HAVE_INCLUDE_NEXT@
-# include_next <sys/socket.h>
-# else
-# include @ABSOLUTE_SYS_SOCKET_H@
-# endif
+# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
#endif