[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib changes to conform to Autoconf 2.59c rules for 'exit'
From: |
Paul Eggert |
Subject: |
Re: gnulib changes to conform to Autoconf 2.59c rules for 'exit' |
Date: |
Mon, 24 Apr 2006 10:53:07 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Doesn't gnulib assume C89 or better; and shouldn't tests be made to
> work with C++ as a C compiler when possible?
Thanks, I installed this as well (in coreutils and gnulib).
2006-04-24 Paul Eggert <address@hidden>
* m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
to define main with arguments, for C++. Reported by Eric Blake.
* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
Prefer 'int main ()' to 'int main (void)', for C++.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
for 'main', for C99 and C++.
Index: m4/c-stack.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/c-stack.m4,v
retrieving revision 1.5
diff -p -u -r1.5 c-stack.m4
--- m4/c-stack.m4 23 Jan 2005 08:06:57 -0000 1.5
+++ m4/c-stack.m4 24 Apr 2006 17:45:12 -0000
@@ -66,7 +66,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR
}
static int
- c_stack_action (void)
+ c_stack_action ()
{
stack_t st;
struct sigaction act;
@@ -94,7 +94,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR
}
int
- main (void)
+ main ()
{
#if HAVE_SETRLIMIT && defined RLIMIT_STACK
/* Before starting the endless recursion, try to be friendly
Index: m4/fsusage.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/fsusage.m4,v
retrieving revision 1.23
diff -p -u -r1.23 fsusage.m4
--- m4/fsusage.m4 24 Apr 2006 07:35:24 -0000 1.23
+++ m4/fsusage.m4 24 Apr 2006 17:45:13 -0000
@@ -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;
Index: m4/getcwd-path-max.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getcwd-path-max.m4,v
retrieving revision 1.7
diff -p -u -r1.7 getcwd-path-max.m4
--- m4/getcwd-path-max.m4 2 Jul 2005 09:58:35 -0000 1.7
+++ m4/getcwd-path-max.m4 24 Apr 2006 17:45:13 -0000
@@ -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 --
Index: m4/unlink-busy.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/unlink-busy.m4,v
retrieving revision 1.6
diff -p -u -r1.6 unlink-busy.m4
--- m4/unlink-busy.m4 24 Apr 2006 07:35:24 -0000 1.6
+++ m4/unlink-busy.m4 24 Apr 2006 17:45:13 -0000
@@ -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;
}])],