summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2006-01-09 16:40:07 +0000
committerSimon Josefsson <simon@josefsson.org>2006-01-09 16:40:07 +0000
commit7d006472717c1720e536636e99219789f6a600f5 (patch)
treea2e7d671117e97e8f3ba0f6aa21fbf7b7910296a /gl
parentb165211b7e41865084044c18d5eb959dda677e0f (diff)
downloadgnutls-7d006472717c1720e536636e99219789f6a600f5.tar.gz
Update.
Diffstat (limited to 'gl')
-rw-r--r--gl/m4/gnulib-comp.m43
-rw-r--r--gl/m4/gnulib-tool.m47
-rw-r--r--gl/m4/socklen.m423
-rw-r--r--gl/m4/stdint.m44
-rw-r--r--gl/stdint_.h14
5 files changed, 37 insertions, 14 deletions
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index e4fb5d8d9e..f860521ad1 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -18,6 +18,7 @@
# any checks for libraries, header files, types and library functions.
AC_DEFUN([gl_EARLY],
[
+ AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AC_GNU_SOURCE])
])
@@ -25,7 +26,7 @@ AC_DEFUN([gl_EARLY],
# "Check for header files, types and library functions".
AC_DEFUN([gl_INIT],
[
-AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
gl_FUNC_ALLOCA
gl_GC
gl_GC_ARCFOUR
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index ef59320316..13343fca22 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
-# gnulib-tool.m4 serial 1
-dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
+# gnulib-tool.m4 serial 2
+dnl Copyright (C) 2004-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.
@@ -20,6 +20,9 @@ AC_DEFUN([gl_SOURCE_BASE], [])
dnl Usage: gl_M4_BASE([DIR])
AC_DEFUN([gl_M4_BASE], [])
+dnl Usage: gl_AUX_BASE([DIR])
+AC_DEFUN([gl_AUX_BASE], [])
+
dnl Usage: gl_LIB([LIBNAME])
AC_DEFUN([gl_LIB], [])
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index 7db6ba3550..bbeaae8620 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,17 +1,18 @@
-# socklen.m4 serial 2
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# socklen.m4 serial 3
+dnl Copyright (C) 2005, 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 Albert Chin.
+dnl From Albert Chin, Windows fixes from Simon Josefsson.
dnl Check for socklen_t: historically on BSD it is an int, and in
dnl POSIX 1g it is a type of its own, but some platforms use different
dnl types for the argument to getsockopt, getpeername, etc. So we
dnl have to test to find something that will work.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
- [AC_CHECK_TYPE([socklen_t], ,
+ [AC_CHECK_HEADERS_ONCE([sys/socket.h ws2tcpip.h])
+ AC_CHECK_TYPE([socklen_t], ,
[AC_MSG_CHECKING([for socklen_t equivalent])
AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
@@ -21,7 +22,12 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T],
for t in int size_t "unsigned int" "long int" "unsigned long int"; do
AC_TRY_COMPILE(
[#include <sys/types.h>
- #include <sys/socket.h>
+ #if HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #if HAVE_WS2TCPIP_H
+ # include <ws2tcpip.h>
+ #endif
int getpeername (int, $arg2 *, $t *);],
[$t len;
@@ -39,4 +45,9 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T],
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
[type to use in place of socklen_t if not defined])],
[#include <sys/types.h>
- #include <sys/socket.h>])])
+ #if HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #if HAVE_WS2TCPIP_H
+ # include <ws2tcpip.h>
+ #endif])])
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 4875752de8..d4a6994c46 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 4
+# stdint.m4 serial 5
dnl Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,8 @@ AC_DEFUN([gl_STDINT_H],
AC_REQUIRE([gt_HEADER_INTTYPES_H])
dnl Check for <sys/inttypes.h>.
AC_CHECK_HEADERS([sys/inttypes.h])
+dnl Check for <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+AC_CHECK_HEADERS([sys/bitypes.h])
AC_MSG_CHECKING([for stdint.h])
AC_CACHE_VAL(gl_cv_header_stdint_h, [
diff --git a/gl/stdint_.h b/gl/stdint_.h
index 9a8e17ad95..2e239b0937 100644
--- a/gl/stdint_.h
+++ b/gl/stdint_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
Written by Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -33,6 +33,12 @@
#if defined(__FreeBSD__)
# include <sys/inttypes.h>
#endif
+#if defined(__linux__) && HAVE_SYS_BITYPES_H
+ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
+ int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
+ included by <sys/types.h>. */
+# include <sys/bitypes.h>
+#endif
#if defined(__sun) && HAVE_SYS_INTTYPES_H
# include <sys/inttypes.h>
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
@@ -48,7 +54,7 @@
UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */
# define _STDINT_H_HAVE_SYSTEM_INTTYPES
#endif
-#if !(defined(UNIX_CYGWIN32) && defined(__BIT_TYPES_DEFINED__))
+#if !((defined(UNIX_CYGWIN32) || defined(__linux__)) && defined(__BIT_TYPES_DEFINED__))
# define _STDINT_H_NEED_SIGNED_INT_TYPES
#endif
@@ -238,8 +244,8 @@ typedef uint32_t uintmax_t;
#define SIG_ATOMIC_MIN 0
#define SIG_ATOMIC_MAX 127
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
+#ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
+# define SIZE_MAX (size_t)~(size_t)0)
#endif
/* wchar_t limits already defined in <stddef.h>. */