summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-09-01 05:40:40 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-09-01 05:40:40 +0300
commit9ad95f3ac723ae85fdfbe4f3a4fab4ededfa7857 (patch)
treebdef366c72733fbed662177a983bb93bf4b02348 /gl
parentc78e1ed45d4781789bf1ff41321aaf973a162499 (diff)
downloadgnutls-9ad95f3ac723ae85fdfbe4f3a4fab4ededfa7857.tar.gz
updated gnulib
Diffstat (limited to 'gl')
-rw-r--r--gl/m4/intl.m46
-rw-r--r--gl/m4/warnings.m413
-rw-r--r--gl/sys_socket.in.h3
-rw-r--r--gl/sys_time.in.h5
-rw-r--r--gl/tests/binary-io.h3
-rw-r--r--gl/tests/test-sys_select.c5
-rw-r--r--gl/tests/test-sys_time.c5
-rw-r--r--gl/u64.h3
-rw-r--r--gl/unistd.in.h3
-rw-r--r--gl/xsize.h3
10 files changed, 38 insertions, 11 deletions
diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4
index 959bd0421f..dffcd881b8 100644
--- a/gl/m4/intl.m4
+++ b/gl/m4/intl.m4
@@ -1,4 +1,4 @@
-# intl.m4 serial 23 (gettext-0.18.3)
+# intl.m4 serial 24 (gettext-0.18.3)
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -61,7 +61,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
- AC_CHECK_DECLS([_snprintf _snwprintf], , , [#include <stdio.h>])
+ AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>])
dnl Use the *_unlocked functions only if they are declared.
dnl (because some of them were defined without being declared in Solaris
@@ -234,7 +234,7 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
dnl (because some of them were defined without being declared in Solaris
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
dnl on Solaris 2.5.1 to run on Solaris 2.6).
- AC_CHECK_DECLS([feof_unlocked fgets_unlocked], , , [#include <stdio.h>])
+ AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>])
AM_ICONV
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 184873283b..5f5da51606 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 8
+# warnings.m4 serial 10
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -25,15 +25,24 @@ m4_ifdef([AS_VAR_APPEND],
AC_DEFUN([gl_COMPILER_OPTION_IF],
[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
+AS_LITERAL_IF([$1],
+ [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))],
+ [gl_positive="$1"
+case $gl_positive in
+ -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+m4_pushdef([gl_Positive], [$gl_positive])])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
gl_save_compiler_FLAGS="$gl_Flags"
- gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors $1"])
+ gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
+ [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
[AS_VAR_SET(gl_Warn, [yes])],
[AS_VAR_SET(gl_Warn, [no])])
gl_Flags="$gl_save_compiler_FLAGS"
])
AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
+m4_popdef([gl_Positive])dnl
AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
])
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 368afe43ff..8bbd5e489f 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -63,6 +63,9 @@
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
#define _@GUARD_PREFIX@_SYS_SOCKET_H
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_SYS_SOCKET_INLINE
# define _GL_SYS_SOCKET_INLINE _GL_INLINE
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index ef39b837bd..84a17c9fec 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -24,11 +24,12 @@
#endif
@PRAGMA_COLUMNS@
-/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
+ recursively via <sys/select.h>.
Simply delegate to the system's header in this case; it is a no-op.
Without this extra ifdef, the C++ gettimeofday declaration below
would be a forward declaration in gnulib's nested <sys/time.h>. */
-#ifdef _CYGWIN_SYS_TIME_H
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#else
diff --git a/gl/tests/binary-io.h b/gl/tests/binary-io.h
index 317fe3d3c2..423c2ae3ff 100644
--- a/gl/tests/binary-io.h
+++ b/gl/tests/binary-io.h
@@ -25,6 +25,9 @@
so we include it here first. */
#include <stdio.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef BINARY_IO_INLINE
# define BINARY_IO_INLINE _GL_INLINE
diff --git a/gl/tests/test-sys_select.c b/gl/tests/test-sys_select.c
index cd84c0103b..1604699879 100644
--- a/gl/tests/test-sys_select.c
+++ b/gl/tests/test-sys_select.c
@@ -40,8 +40,9 @@ SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
/* Check that the 'struct timeval' type is defined. */
struct timeval a;
-/* Check that &a.tv_sec is a 'time_t *', ignoring signedness issues. */
-typedef int verify_tv_sec_type[sizeof (a.tv_sec) == sizeof (time_t) ? 1 : -1];
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+ signedness issues. */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
/* Check that sigset_t is defined. */
sigset_t t2;
diff --git a/gl/tests/test-sys_time.c b/gl/tests/test-sys_time.c
index 1389b52008..80628423e1 100644
--- a/gl/tests/test-sys_time.c
+++ b/gl/tests/test-sys_time.c
@@ -23,8 +23,9 @@
/* Check that the 'struct timeval' type is defined. */
struct timeval a;
-/* Check that &a.tv_sec is a 'time_t *', ignoring signedness issues. */
-typedef int verify_tv_sec_type[sizeof (a.tv_sec) == sizeof (time_t) ? 1 : -1];
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+ signedness issues. */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
int
main (void)
diff --git a/gl/u64.h b/gl/u64.h
index 11946d4510..de6599038a 100644
--- a/gl/u64.h
+++ b/gl/u64.h
@@ -19,6 +19,9 @@
#include <stdint.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_U64_INLINE
# define _GL_U64_INLINE _GL_INLINE
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 69c94cce90..8d2f1313f1 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -116,6 +116,9 @@
# include <getopt.h>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
diff --git a/gl/xsize.h b/gl/xsize.h
index aa08ef4885..3014bb2e39 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -27,6 +27,9 @@
# include <stdint.h>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XSIZE_INLINE
# define XSIZE_INLINE _GL_INLINE