* getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
* jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
also add missing comma that caused broken test.
* link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
stdlib.h, for `abort'.
* ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
variables.
* mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
include unistd.h if present, for `rmdir'.
* physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
variables.
* putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
in the process include standard headers for prototypes.
* readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
gets declared on GNU/Linux.
* rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
unistd.h, for `rmdir'.
* time_r.m4 (gl_TIME_R): Avoid unused variables.
2006-09-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
+ * getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
+ * jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
+ also add missing comma that caused broken test.
+ * link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
+ stdlib.h, for `abort'.
+ * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
+ variables.
+ * mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
+ include unistd.h if present, for `rmdir'.
+ * physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
+ variables.
+ * putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
+ in the process include standard headers for prototypes.
+ * readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
+ gets declared on GNU/Linux.
+ * rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
+ unistd.h, for `rmdir'.
+ * time_r.m4 (gl_TIME_R): Avoid unused variables.
+
* fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
always true.
* strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
-#serial 21
+#serial 22
# Obtaining file system usage information.
# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
#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
-# 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,
[
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
-#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.
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
-#serial 8
+#serial 9
dnl Run a program to determine whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
# 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 \
-#serial 24
+#serial 25
# How to list mounted file systems.
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
# 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)
-#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.
# 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,
[
# include <sys/types.h>
# include <sys/stat.h>
# include <stdlib.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
int main ()
{
rmdir ("confdir-slash");
-# 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,
[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])])
-# 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,
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.
-# 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,
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])
-#serial 7
+#serial 8
# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# 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,
[
AC_TRY_RUN([
#include <stdio.h>
#include <errno.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
int main ()
{
FILE *s;
[/* 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