Hello Jim, Simon,
* Jim Meyering wrote on Fri, Sep 22, 2006 at 09:03:40AM CEST:
> Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> >
> > OK to apply these patches[...]
> A couple of nits:
> - fsusage.m4 needs a serial number update.
Done.
> - at least one other file does, too.
m4/ls-mntd-fs.m4 does.
> - mkdir-slash.m4's serial number was incremented twice :-)
As was sockpfaf.m4's.
> - for those that now include unistd.h,
> add AC_CHECK_HEADERS_ONCE(unistd.h),
I did that.
> or maybe even AC_REQUIRE([gl_HEADER_UNISTD]),
> or just depend on the `unistd' module and drop the #ifdefs,
> though I'm not sure the last will work for configure-time compiles.
I didn't do any of these. The replacement header is currently empty: it
would not help to declare `rmdir'. Besides, it won't work for configure
time compiles (easily).
Updated patches attached.
> How did you test these changes?
I used a megatest, as shown in another mail, and then manually inspected
each hard failure (be that autogen, configure, build), and searched all
config.log files for the keyword `warning' and some other suspicious
stuff.
> I've found it useful to compare the following (e.g., via coreutils),
> before and after the change:
> lib/config.h
> ./configure output
Yes. On my list of things to add was a test similar to the one in
Autoconf's testsuite; that would check that caching works as intended,
and that temporary files are cleaned up. There's a way to go though.
* Simon Josefsson wrote:
> I didn't test it, but at glance it seems fine to me.
Thanks. I've installed the two portions as below; I suppose Bruno will
have a say about the diff against the modules he maintains.
Cheers,
Ralf
Index: m4/sockpfaf.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/sockpfaf.m4,v
retrieving revision 1.4
diff -u -r1.4 sockpfaf.m4
--- m4/sockpfaf.m4 5 Jul 2006 18:06:09 -0000 1.4
+++ m4/sockpfaf.m4 22 Sep 2006 17:28:03 -0000
@@ -1,4 +1,4 @@
-# sockpfaf.m4 serial 4
+# sockpfaf.m4 serial 5
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,
@@ -28,7 +28,8 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif],
-[int x = AF_INET; struct in_addr y; struct sockaddr_in z;],
+[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;],
gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
AC_MSG_RESULT($gl_cv_socket_ipv4)
if test $gl_cv_socket_ipv4 = yes; then
@@ -47,7 +48,8 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif],
-[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;],
+[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;],
gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
AC_MSG_RESULT($gl_cv_socket_ipv6)
if test $gl_cv_socket_ipv6 = yes; then
Index: m4/fsusage.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/fsusage.m4,v
retrieving revision 1.29
diff -u -r1.29 fsusage.m4
--- m4/fsusage.m4 7 Sep 2006 16:17:48 -0000 1.29
+++ m4/fsusage.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-#serial 21
+#serial 22
# Obtaining file system usage information.
# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
@@ -242,7 +242,8 @@
#endif
#include <sys/types.h>
#include <sys/vfs.h>]],
- [[struct statfs t; long c = *(t.f_spare);]])],
+ [[struct statfs t; long c = *(t.f_spare);
+ if (c) return 0;]])],
[fu_cv_sys_truncating_statfs=yes],
[fu_cv_sys_truncating_statfs=no])])
if test $fu_cv_sys_truncating_statfs = yes; then
Index: m4/getdate.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getdate.m4,v
retrieving revision 1.11
diff -u -r1.11 getdate.m4
--- m4/getdate.m4 13 Sep 2006 20:14:57 -0000 1.11
+++ m4/getdate.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-# getdate.m4 serial 11
+# getdate.m4 serial 12
dnl Copyright (C) 2002, 2003, 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,
@@ -8,7 +8,8 @@
[
AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals,
[AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 };],
- [struct s t = (struct s) { 3, 4 };],
+ [struct s t = (struct s) { 3, 4 };
+ if (t.i != 0) return 0;],
gl_cv_compound_literals=yes,
gl_cv_compound_literals=no)])
if test $gl_cv_compound_literals = yes; then
Index: m4/jm-winsz1.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/jm-winsz1.m4,v
retrieving revision 1.8
diff -u -r1.8 jm-winsz1.m4
--- m4/jm-winsz1.m4 23 Jan 2005 08:06:57 -0000 1.8
+++ m4/jm-winsz1.m4 22 Sep 2006 17:32:58 -0000
@@ -1,6 +1,6 @@
-#serial 8
+#serial 9
-# Copyright (C) 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2002, 2004, 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.
@@ -30,13 +30,15 @@
jm_cv_sys_struct_winsize_needs_sys_ptem_h,
[jm_cv_sys_struct_winsize_needs_sys_ptem_h=yes
if test $ac_cv_sys_posix_termios = yes; then
- AC_TRY_COMPILE([#include <termios.h>]
- [struct winsize x;],
+ AC_TRY_COMPILE([#include <termios.h>],
+ [struct winsize x;
+ if (sizeof x > 0) return 0;],
[jm_cv_sys_struct_winsize_needs_sys_ptem_h=no])
fi
if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
AC_TRY_COMPILE([#include <sys/ptem.h>],
- [struct winsize x;],
+ [struct winsize x;
+ if (sizeof x > 0) return 0;],
[], [jm_cv_sys_struct_winsize_needs_sys_ptem_h=no])
fi])
if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
Index: m4/link-follow.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/link-follow.m4,v
retrieving revision 1.12
diff -u -r1.12 link-follow.m4
--- m4/link-follow.m4 9 Jul 2006 01:31:04 -0000 1.12
+++ m4/link-follow.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
dnl Run a program to determine whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
@@ -20,6 +20,7 @@
# include <sys/types.h>
# include <sys/stat.h>
# include <unistd.h>
+# include <stdlib.h>
# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
Index: m4/ls-mntd-fs.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/ls-mntd-fs.m4,v
retrieving revision 1.35
diff -u -r1.35 ls-mntd-fs.m4
--- m4/ls-mntd-fs.m4 8 Sep 2006 09:10:57 -0000 1.35
+++ m4/ls-mntd-fs.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-#serial 24
+#serial 25
# How to list mounted file systems.
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
@@ -141,7 +141,8 @@
# endif
#endif
],
- [ struct mntent *mnt = 0; char *table = MOUNTED; ],
+ [ struct mntent *mnt = 0; char *table = MOUNTED;
+ if (sizeof mnt > 0 && table > 0) return 0;],
fu_cv_sys_mounted_getmntent1=yes,
fu_cv_sys_mounted_getmntent1=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
Index: m4/mkdir-slash.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/mkdir-slash.m4,v
retrieving revision 1.6
diff -u -r1.6 mkdir-slash.m4
--- m4/mkdir-slash.m4 23 Jan 2005 08:06:57 -0000 1.6
+++ m4/mkdir-slash.m4 22 Sep 2006 17:32:58 -0000
@@ -1,6 +1,6 @@
-#serial 4
+#serial 5
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 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.
@@ -10,6 +10,7 @@
# trailing slashes.
AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
gl_cv_func_mkdir_trailing_slash_bug,
[
@@ -19,6 +20,9 @@
# include <sys/types.h>
# include <sys/stat.h>
# include <stdlib.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
int main ()
{
rmdir ("confdir-slash");
Index: m4/physmem.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/physmem.m4,v
retrieving revision 1.6
diff -u -r1.6 physmem.m4
--- m4/physmem.m4 21 Aug 2006 21:46:31 -0000 1.6
+++ m4/physmem.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-# physmem.m4 serial 6
+# physmem.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,
@@ -12,7 +12,8 @@
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/systemcfg.h>
]],
- [double x = _system_configuration.physmem;])],
+ [double x = _system_configuration.physmem;
+ if (x > 0.0) return 0;])],
[gl_cv_var__system_configuration=yes],
[gl_cv_var__system_configuration=no])])
Index: m4/putenv.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/putenv.m4,v
retrieving revision 1.17
diff -u -r1.17 putenv.m4
--- m4/putenv.m4 24 Apr 2006 07:35:24 -0000 1.17
+++ m4/putenv.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-# putenv.m4 serial 11
+# putenv.m4 serial 12
dnl Copyright (C) 2002, 2003, 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,
@@ -11,25 +11,21 @@
AC_DEFUN([gl_FUNC_PUTENV],
[AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
- [AC_TRY_RUN([
- int
- main ()
- {
- /* Put it in env. */
- if (putenv ("CONFTEST_putenv=val"))
- return 1;
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
- /* Try to remove it. */
- if (putenv ("CONFTEST_putenv"))
- return 1;
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
- /* Make sure it was deleted. */
- if (getenv ("CONFTEST_putenv") != 0)
- return 1;
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
- return 0;
- }
- ],
+ return 0;
+ ])],
jm_cv_func_svid_putenv=yes,
jm_cv_func_svid_putenv=no,
dnl When crosscompiling, assume putenv is broken.
Index: m4/readutmp.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/readutmp.m4,v
retrieving revision 1.13
diff -u -r1.13 readutmp.m4
--- m4/readutmp.m4 22 Aug 2006 17:34:55 -0000 1.13
+++ m4/readutmp.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-# readutmp.m4 serial 11
+# readutmp.m4 serial 12
dnl Copyright (C) 2002, 2003, 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,6 +6,9 @@
AC_DEFUN([gl_READUTMP],
[
+ dnl Persuade utmpx.h to declare utmpxname
+ AC_REQUIRE([AC_GNU_SOURCE])
+
AC_CHECK_HEADERS_ONCE(utmp.h utmpx.h)
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
AC_LIBOBJ([readutmp])
Index: m4/rmdir-errno.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/rmdir-errno.m4,v
retrieving revision 1.7
diff -u -r1.7 rmdir-errno.m4
--- m4/rmdir-errno.m4 17 Jun 2006 19:26:19 -0000 1.7
+++ m4/rmdir-errno.m4 22 Sep 2006 17:32:58 -0000
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -12,6 +12,7 @@
# test runs a test to determine the actual numeric value.
AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([for rmdir-not-empty errno value],
gl_cv_func_rmdir_errno_not_empty,
[
@@ -21,6 +22,9 @@
AC_TRY_RUN([
#include <stdio.h>
#include <errno.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
int main ()
{
FILE *s;
Index: m4/time_r.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/time_r.m4,v
retrieving revision 1.5
diff -u -r1.5 time_r.m4
--- m4/time_r.m4 21 Aug 2006 21:46:31 -0000 1.5
+++ m4/time_r.m4 22 Sep 2006 17:32:58 -0000
@@ -19,7 +19,8 @@
[/* We don't need to append 'restrict's to the argument types,
even though the POSIX signature has the 'restrict's,
since C99 says they can't affect type compatibility. */
- struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;],
+ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+ if (ptr) return 0;],
[gl_cv_time_r_posix=yes],
[gl_cv_time_r_posix=no])])
if test $gl_cv_time_r_posix = yes; then