summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-04 05:39:07 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-04 05:39:07 +0000
commit6a9740567292a983b05533901dc7a687ec2fb68c (patch)
tree942771c90c0eff8fc776a1b631e9032e60641ea7 /m4
parent8e19f6282b0621f63b47716bd2eadfb9d466c758 (diff)
downloadcoreutils-6a9740567292a983b05533901dc7a687ec2fb68c.tar.xz
Sync from gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog55
-rw-r--r--m4/dirfd.m49
-rw-r--r--m4/extensions.m43
-rw-r--r--m4/getaddrinfo.m425
-rw-r--r--m4/getpass.m410
-rw-r--r--m4/longdouble.m47
-rw-r--r--m4/mbswidth.m432
-rw-r--r--m4/rmdir-errno.m45
-rw-r--r--m4/sockpfaf.m424
-rw-r--r--m4/ssize_t.m413
-rw-r--r--m4/unlocked-io.m424
11 files changed, 143 insertions, 64 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 17aa7dc72..3442635ce 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,58 @@
+2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Require gl_FUNC_WCWIDTH, to accommodate
+ changes mentioned below.
+ * setenv.m4 (gt_FUNC_SETENV): Undo private change that added an
+ AC_LIBSOURCES line here, since Bruno didn't buy it back. Instead,
+ update ../lib/Makefile.am to mention the files explicitly.
+
+ Sync from gnulib.
+
+ 2006-06-28 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4: Look for getnameinfo prototypes too.
+
+ 2006-06-28 Eric Blake <ebb9@byu.net>
+
+ * mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
+ * wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
+
+ 2006-06-22 Simon Josefsson <jas@extundo.com>
+
+ * sockpfaf.m4: Include winsock2.h too, to make it work under
+ MinGW.
+
+ 2006-06-21 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4: Don't define WINVER. Look for gethostbyname in
+ -lws2_32 too. Fixes getaddrinfo on Windows 2000, with the price
+ of using the (limited) gnulib implementation on Windows XP.
+
+ 2006-06-17 Bruno Haible <bruno@clisp.org>
+
+ * setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
+ whether errno is declared. Assume <errno.h> declares errno.
+
+ 2006-06-16 Eric Blake <ebb9@byu.net>
+
+ * rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
+ errno.
+
+ 2006-06-15 Eric Blake <ebb9@byu.net>
+
+ * ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
+
+ 2006-04-20 Bruno Haible <bruno@clisp.org>
+
+ * getpass.m4 (gl_PREREQ_GETPASS):
+ Don't call AC_CHECK_DECLS_ONCE with more than
+ one argument, so that the code will be portable to Autoconf 2.60.
+ * unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
+
+ 2006-03-15 Eric Blake <ebb9@byu.net>
+
+ * dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
+
2006-07-03 Jim Meyering <jim@meyering.net>
* ftruncate.m4 (gl_FUNC_FTRUNCATE): Adjust diagnostic to recommend
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index db2a9a0ed..7c5cf9608 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,8 +1,9 @@
-#serial 10
+#serial 11 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,8 +17,8 @@ AC_DEFUN([gl_FUNC_DIRFD],
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_EGREP])
+ AC_REQUIRE([AC_HEADER_DIRENT])
- AC_HEADER_DIRENT
dirfd_headers='
#if HAVE_DIRENT_H
# include <dirent.h>
@@ -55,7 +56,7 @@ AC_DEFUN([gl_FUNC_DIRFD],
[how to get the file descriptor associated with an open DIR*],
gl_cv_sys_dir_fd_member_name,
[
- dirfd_save_CFLAGS=$CFLAGS
+ dirfd_save_CFLAGS=$CFLAGS
for ac_expr in d_fd dd_fd; do
CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 51394b5c8..497607918 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -5,6 +5,9 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# This file is only needed in autoconf <= 2.59. Newer versions of autoconf
+# have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics.
+
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4
index c36719078..8d57bb327 100644
--- a/m4/getaddrinfo.m4
+++ b/m4/getaddrinfo.m4
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 9
+# getaddrinfo.m4 serial 10
dnl Copyright (C) 2004, 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,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_GETADDRINFO],
[
- AC_MSG_NOTICE([checking how to do getaddrinfo])
+ AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
AC_CHECK_FUNCS(getaddrinfo,, [
@@ -17,7 +17,6 @@ AC_DEFUN([gl_GETADDRINFO],
LIBS="$LIBS -lws2_32"
AC_TRY_LINK([
#ifdef HAVE_WS2TCPIP_H
-#define WINVER 0x0501
#include <ws2tcpip.h>
#endif
], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes)
@@ -37,13 +36,29 @@ AC_DEFUN([gl_GETADDRINFO],
AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_SEARCH_LIBS(gethostbyname, [inet nsl])
AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
+ AC_CHECK_FUNCS(gethostbyname,, [
+ AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32,
+ gl_cv_w32_gethostbyname, [
+ gl_cv_w32_gethostbyname=no
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -lws2_32"
+ AC_TRY_LINK([
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes)
+ LIBS="$am_save_LIBS"])
+ if test "$gl_cv_w32_gethostbyname" = "yes"; then
+ LIBS="$LIBS -lws2_32"
+ fi
+ ])
AC_REQUIRE([gl_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_GNU_SOURCE])
AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h)
- AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror],,,[
+ AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
/* sys/types.h is not needed according to POSIX, but the
sys/socket.h in i386-unknown-freebsd4.10 and
powerpc-apple-darwin5.5 required it. */
@@ -55,7 +70,6 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#include <netdb.h>
#endif
#ifdef HAVE_WS2TCPIP_H
-#define WINVER 0x0501
#include <ws2tcpip.h>
#endif
])
@@ -68,7 +82,6 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#include <netdb.h>
#endif
#ifdef HAVE_WS2TCPIP_H
-#define WINVER 0x0501
#include <ws2tcpip.h>
#endif
])
diff --git a/m4/getpass.m4 b/m4/getpass.m4
index 3d7d33bbb..ba6815f61 100644
--- a/m4/getpass.m4
+++ b/m4/getpass.m4
@@ -1,5 +1,5 @@
-# getpass.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+# getpass.m4 serial 7
+dnl Copyright (C) 2002-2003, 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.
@@ -37,5 +37,9 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
AC_DEFUN([gl_PREREQ_GETPASS], [
AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h)
AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr)
- AC_CHECK_DECLS_ONCE([fflush_unlocked flockfile fputs_unlocked funlockfile putc_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([flockfile])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([funlockfile])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
])
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
index 40cd7ce02..25590f470 100644
--- a/m4/longdouble.m4
+++ b/m4/longdouble.m4
@@ -1,5 +1,5 @@
-# longdouble.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# longdouble.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 2002-2003, 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.
@@ -8,6 +8,9 @@ dnl From Bruno Haible.
dnl Test whether the compiler supports the 'long double' type.
dnl Prerequisite: AC_PROG_CC
+dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf
+dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
+
AC_DEFUN([gt_TYPE_LONGDOUBLE],
[
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
diff --git a/m4/mbswidth.m4 b/m4/mbswidth.m4
index 878e5311d..3cb200039 100644
--- a/m4/mbswidth.m4
+++ b/m4/mbswidth.m4
@@ -1,5 +1,5 @@
-# mbswidth.m4 serial 11
-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+# mbswidth.m4 serial 12
+dnl Copyright (C) 2000-2002, 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.
@@ -9,33 +9,11 @@ dnl From Bruno Haible.
AC_DEFUN([gl_MBSWIDTH],
[
- AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
- AC_CHECK_FUNCS_ONCE(isascii iswprint mbsinit)
- AC_CHECK_FUNCS(iswcntrl wcwidth)
+ AC_CHECK_HEADERS_ONCE([wchar.h wctype.h])
+ AC_CHECK_FUNCS_ONCE([isascii mbsinit])
+ AC_CHECK_FUNCS([iswcntrl])
gl_FUNC_MBRTOWC
- AC_CACHE_CHECK([whether wcwidth is declared], ac_cv_have_decl_wcwidth,
- [AC_TRY_COMPILE([
-/* AIX 3.2.5 declares wcwidth in <string.h>. */
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-#if HAVE_WCHAR_H
-# include <wchar.h>
-#endif
-], [
-#ifndef wcwidth
- char *p = (char *) wcwidth;
-#endif
-], ac_cv_have_decl_wcwidth=yes, ac_cv_have_decl_wcwidth=no)])
- if test $ac_cv_have_decl_wcwidth = yes; then
- ac_val=1
- else
- ac_val=0
- fi
- AC_DEFINE_UNQUOTED(HAVE_DECL_WCWIDTH, $ac_val,
- [Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.])
-
dnl UnixWare 7.1.1 <wchar.h> has a declaration of a function mbswidth()
dnl that clashes with ours.
AC_CACHE_CHECK([whether mbswidth is declared in <wchar.h>],
diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4
index c6b582947..2907e7b34 100644
--- a/m4/rmdir-errno.m4
+++ b/m4/rmdir-errno.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -21,9 +21,6 @@ AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
AC_TRY_RUN([
#include <stdio.h>
#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
int main ()
{
FILE *s;
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
index b224faec5..9e396ebaf 100644
--- a/m4/sockpfaf.m4
+++ b/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
-# sockpfaf.m4 serial 2
-dnl Copyright (C) 2004 Free Software Foundation, Inc.
+# sockpfaf.m4 serial 3
+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.
@@ -13,11 +13,20 @@ dnl From Bruno Haible.
AC_DEFUN([gl_SOCKET_FAMILIES],
[
+ AC_CHECK_HEADERS_ONCE(sys/socket.h netinet/in.h winsock2.h)
+
AC_MSG_CHECKING(for IPv4 sockets)
AC_CACHE_VAL(gl_cv_socket_ipv4,
[AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#include <netinet/in.h>],
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif],
[int x = AF_INET; struct in_addr y; struct sockaddr_in z;],
gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
AC_MSG_RESULT($gl_cv_socket_ipv4)
@@ -28,8 +37,15 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
AC_MSG_CHECKING(for IPv6 sockets)
AC_CACHE_VAL(gl_cv_socket_ipv6,
[AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#include <netinet/in.h>],
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif],
[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;],
gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
AC_MSG_RESULT($gl_cv_socket_ipv6)
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 19b379fee..4eaef93ce 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
-# ssize_t.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+# ssize_t.m4 serial 4 (gettext-0.15)
+dnl Copyright (C) 2001-2003, 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.
@@ -9,12 +9,13 @@ dnl Test whether ssize_t is defined.
AC_DEFUN([gt_TYPE_SSIZE_T],
[
- AC_CACHE_CHECK([for ssize_t], gt_cv_ssize_t,
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
[AC_TRY_COMPILE([#include <sys/types.h>],
- [int x = sizeof (ssize_t *) + sizeof (ssize_t);],
- gt_cv_ssize_t=yes, gt_cv_ssize_t=no)])
+ [int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
if test $gt_cv_ssize_t = no; then
- AC_DEFINE(ssize_t, int,
+ AC_DEFINE([ssize_t], [int],
[Define as a signed type of the same size as size_t.])
fi
])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index 6cbacb003..f58e96015 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,7 +1,7 @@
-# unlocked-io.m4 serial 12
+# unlocked-io.m4 serial 13
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
-# Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -28,9 +28,17 @@ AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
dnl fgets_unlocked(), fputs_unlocked() etc.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_DECLS_ONCE(
- [clearerr_unlocked feof_unlocked ferror_unlocked
- fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
- fread_unlocked fwrite_unlocked getc_unlocked
- getchar_unlocked putc_unlocked putchar_unlocked])
+ AC_CHECK_DECLS_ONCE([clearerr_unlocked])
+ AC_CHECK_DECLS_ONCE([feof_unlocked])
+ AC_CHECK_DECLS_ONCE([ferror_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fputc_unlocked])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([fread_unlocked])
+ AC_CHECK_DECLS_ONCE([fwrite_unlocked])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+ AC_CHECK_DECLS_ONCE([getchar_unlocked])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ AC_CHECK_DECLS_ONCE([putchar_unlocked])
])