Always explicitly declare main() with the return type `int'. Don't use
authorPavel Roskin <proskin@src.gnome.org>
Wed, 13 Jun 2001 19:17:16 +0000 (19:17 +0000)
committerPavel Roskin <proskin@src.gnome.org>
Wed, 13 Jun 2001 19:17:16 +0000 (19:17 +0000)
* gnome-fileutils.m4: Always explicitly declare main() with the
return type `int'. Don't use exit() since it may be undeclared.
Use `return' instead.
* gnome-pilot.m4: Likewise.
* gperf-check.m4: Likewise.
* linger.m4: Likewise.

svn path=/trunk/; revision=1791

macros/ChangeLog
macros/gnome-fileutils.m4
macros/gnome-pilot.m4
macros/gperf-check.m4
macros/linger.m4

index 0f471ff..f8274d4 100644 (file)
@@ -1,3 +1,12 @@
+2001-06-13  Pavel Roskin  <proski@gnu.org>
+
+       * gnome-fileutils.m4: Always explicitly declare main() with the
+       return type `int'. Don't use exit() since it may be undeclared.
+       Use `return' instead.
+       * gnome-pilot.m4: Likewise.
+       * gperf-check.m4: Likewise.
+       * linger.m4: Likewise.
+
 2001-06-01  Peter Williams  <peterw@ximian.com>
 
        * autogen.sh: s,Gnome,$PKG_NAME,g
index 7c11a78..ebb0286 100644 (file)
@@ -250,11 +250,11 @@ AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/mount.h>
-main ()
+int main ()
 {
 struct statfs fsd;
 fsd.f_fsize = 0;
-exit (statfs (".", &fsd, sizeof (struct statfs)));
+return (statfs (".", &fsd, sizeof (struct statfs)));
 }],
 fu_cv_sys_stat_statfs3_osf1=yes,
 fu_cv_sys_stat_statfs3_osf1=no,
@@ -281,11 +281,11 @@ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
 #ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
-main ()
+int main ()
 {
 struct statfs fsd;
 fsd.f_bsize = 0;
-exit (statfs (".", &fsd));
+return (statfs (".", &fsd));
 }],
 fu_cv_sys_stat_statfs2_bsize=yes,
 fu_cv_sys_stat_statfs2_bsize=no,
@@ -303,10 +303,10 @@ AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
 AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
 [AC_TRY_RUN([#include <sys/types.h>
 #include <sys/statfs.h>
-main ()
+int main ()
 {
 struct statfs fsd;
-exit (statfs (".", &fsd, sizeof fsd, 0));
+return (statfs (".", &fsd, sizeof fsd, 0));
 }],
 fu_cv_sys_stat_statfs4=yes,
 fu_cv_sys_stat_statfs4=no,
@@ -330,11 +330,11 @@ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
-main ()
+int main ()
 {
 struct statfs fsd;
 fsd.f_fsize = 0;
-exit (statfs (".", &fsd));
+return (statfs (".", &fsd));
 }],
 fu_cv_sys_stat_statfs2_fsize=yes,
 fu_cv_sys_stat_statfs2_fsize=no,
@@ -360,12 +360,12 @@ AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
 #ifdef HAVE_SYS_FS_TYPES_H
 #include <sys/fs_types.h>
 #endif
-main ()
+int main ()
 {
 struct fs_data fsd;
 /* Ultrix's statfs returns 1 for success,
 0 for not mounted, -1 for failure.  */
-exit (statfs (".", &fsd) != 1);
+return (statfs (".", &fsd) != 1);
 }],
 fu_cv_sys_stat_fs_data=yes,
 fu_cv_sys_stat_fs_data=no,
index 17d03ba..f35e9b0 100644 (file)
@@ -88,15 +88,15 @@ AC_DEFUN([PILOT_LINK_HOOK],[
                                if (PILOT_LINK_VERSION == $pl_ve) {
                                        if (PILOT_LINK_MAJOR == $pl_ma) {
                                                if (PILOT_LINK_MINOR >= $pl_mi) {
-                                                       exit(0);
+                                                       return 0;
                                                }
                                        } else if (PILOT_LINK_MAJOR > $pl_ma) {
-                                               exit(0);
+                                               return 0;
                                        }
                                } else if (PILOT_LINK_VERSION > $pl_ve) {
-                                       exit(0);
+                                       return 0;
                                }
-                               exit(1);
+                               return 1;
                        }
                        ],
                        [AC_MSG_RESULT(yes (found $PILOT_LINK_VERSION))],
index 1b73d3f..3869459 100644 (file)
@@ -53,7 +53,7 @@ main ()
   tmp_version = my_strdup("$min_gperf_version");
   if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
     printf ("%s, bad version string\n", "$min_gperf_version");
-    exit (1);
+    return 1;
   }
 
   if (($gperf_major_version > major) ||
index 1dfb89d..f1c7060 100644 (file)
@@ -10,11 +10,11 @@ AC_TRY_RUN([
 
 struct linger li;
 
-main ()
+int main ()
 {
     li.l_onoff = 1;
     li.l_linger = 120;
-    exit (0);
+    return 0;
 }
 ],[
 AC_DEFINE(HAVE_STRUCT_LINGER)