summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-04-24 17:50:24 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-04-24 17:50:24 +0000
commitd02ad577646aece2056bcca4df4638e88be92091 (patch)
treeb4dd1e4ed73121f53b4c954a83f643251ef46748 /m4
parent779532f5567bf44c5e7eb4742fea7de80d1f7719 (diff)
downloadcoreutils-d02ad577646aece2056bcca4df4638e88be92091.tar.xz
* unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
to define main with arguments, for C++. Reported by Eric Blake. * c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Prefer 'int main ()' to 'int main (void)', for C++. * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type for 'main', for C99 and C++.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog10
-rw-r--r--m4/fsusage.m47
-rw-r--r--m4/getcwd-path-max.m46
-rw-r--r--m4/unlink-busy.m46
4 files changed, 21 insertions, 8 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 8779e4050..c33850c19 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,5 +1,15 @@
2006-04-24 Paul Eggert <eggert@cs.ucla.edu>
+ * unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
+ to define main with arguments, for C++. Reported by Eric Blake.
+ * c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
+ Prefer 'int main ()' to 'int main (void)', for C++.
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
+ * fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
+ for 'main', for C99 and C++.
+
+2006-04-24 Paul Eggert <eggert@cs.ucla.edu>
+
* fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
Don't assume that exit status -1 is valid.
* nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index 91a17afdf..451bd7d1e 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,4 +1,4 @@
-#serial 17
+#serial 18
# Obtaining file system usage information.
# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
@@ -74,6 +74,7 @@ if test $ac_fsusage_space = no; then
#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
+ int
main ()
{
struct statfs fsd;
@@ -106,6 +107,7 @@ member (AIX, 4.3BSD)])
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
+ int
main ()
{
struct statfs fsd;
@@ -130,6 +132,7 @@ if test $ac_fsusage_space = no; then
AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/statfs.h>
+ int
main ()
{
struct statfs fsd;
@@ -158,6 +161,7 @@ member (4.4BSD and NetBSD)])
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
+ int
main ()
{
struct statfs fsd;
@@ -190,6 +194,7 @@ if test $ac_fsusage_space = no; then
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fs_types.h>
#endif
+ int
main ()
{
struct fs_data fsd;
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
index 5a6c43a44..4bc8ab70f 100644
--- a/m4/getcwd-path-max.m4
+++ b/m4/getcwd-path-max.m4
@@ -1,4 +1,4 @@
-#serial 10
+#serial 11
# Check for several getcwd bugs with long file names.
# If so, arrange to compile the wrapper function.
@@ -6,7 +6,7 @@
# I've heard that this is due to a Linux kernel bug, and that it has
# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 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.
@@ -61,7 +61,7 @@ AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
#define BUF_SLOP 20
int
-main (void)
+main ()
{
#ifndef PATH_MAX
/* The Hurd doesn't define this, so getcwd can't exhibit the bug --
diff --git a/m4/unlink-busy.m4 b/m4/unlink-busy.m4
index e40ce8799..cdc5f74a0 100644
--- a/m4/unlink-busy.m4
+++ b/m4/unlink-busy.m4
@@ -1,4 +1,4 @@
-#serial 9
+#serial 10
dnl From J. David Anglin.
@@ -18,9 +18,7 @@ AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
[AC_LANG_SOURCE(
[AC_INCLUDES_DEFAULT
int
- main (argc, argv)
- int argc;
- char **argv;
+ main (int argc, char **argv)
{
return !argc || unlink (argv[0]) != 0;
}])],