Remove K&R cruft.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 9 Sep 2003 21:46:50 +0000 (21:46 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 9 Sep 2003 21:46:50 +0000 (21:46 +0000)
lib/group-member.c
lib/idcache.c
lib/makepath.c
lib/malloc.c
lib/realloc.c
m4/group-member.m4
m4/idcache.m4
m4/makepath.m4

index 900c6c8469546495d276f632e6b1b9f736b27701..8823506b0f722b26c09e3cd508c5eb43d2a68bac 100644 (file)
 # include <config.h>
 #endif
 
+#include "group-member.h"
+
 #include <stdio.h>
 #include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
-#include "group-member.h"
 #include "xalloc.h"
 
 struct group_info
@@ -127,7 +125,7 @@ group_member (gid_t gid)
 char *program_name;
 
 int
-main (int argc, char** argv)
+main (int argc, char **argv)
 {
   int i;
 
index 4241d1e12309ee3df1c39137dba421f5cb449812..8b85f07c396fa77499d04318d0df141d3e5f95f2 100644 (file)
 #endif
 
 #include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
 
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index f2dfe8891411e582f61f8a7cee175f538b5aee71..422bcda82ac5c27113e04d6570b4d753b6bfa150 100644 (file)
@@ -23,6 +23,8 @@
 # include <config.h>
 #endif
 
+#include "makepath.h"
+
 #include <alloca.h>
 
 #include <stdio.h>
@@ -44,9 +46,7 @@
 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
 
-#if STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #include <errno.h>
 
 extern int errno;
 #endif
 
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef strchr
-#  define strchr index
-# endif
-#endif
+#include <string.h>
 
 #ifndef S_ISUID
 # define S_ISUID 04000
@@ -88,8 +81,6 @@ extern int errno;
 
 #define WX_USR (S_IWUSR | S_IXUSR)
 
-#include "makepath.h"
-
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
index bcd6b564b07abf5d41a5d1faeca6ecb3aa6e29ae..a43d169271b733412ba2f8326fd7f7643de93869 100644 (file)
 #endif
 #undef malloc
 
-#include <stddef.h>
-
-char *malloc ();
+#include <stdlib.h>
 
 /* Allocate an N-byte block of memory from the heap.
    If N is zero, allocate a 1-byte block.  */
 
-char *
+void *
 rpl_malloc (size_t n)
 {
   if (n == 0)
index 573712108539416a8f8c7d4e39713d718983e8d7..ccbf991388e5010bb8399d016cdb57e5ac34ed2c 100644 (file)
 #endif
 #undef realloc
 
-#include <stddef.h>
-
-char *malloc ();
-char *realloc ();
+#include <stdlib.h>
 
 /* Change the size of an allocated block of memory P to N bytes,
    with error checking.  If N is zero, change it to 1.  If P is NULL,
    use malloc.  */
 
-char *
-rpl_realloc (p, n)
-     char *p;
-     size_t n;
+void *
+rpl_realloc (void *p, size_t n)
 {
   if (n == 0)
     n = 1;
index 36fda49f15102fc94efb4f13cbf66b41912b2248..bfef4809cb5eca5d8ff544b2ded89d5bc5316b8c 100644 (file)
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
 
 dnl Written by Jim Meyering
 
@@ -18,7 +18,6 @@ AC_DEFUN([jm_FUNC_GROUP_MEMBER],
 # Prerequisites of lib/group-member.c.
 AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
 [
-  AC_REQUIRE([AC_HEADER_STDC])
   AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([AC_FUNC_GETGROUPS])
 ])
index 834d1f19a5764675e9d1b8b05d1f4d895b4da782..d20d3920926605c9bca7506a50e21dc27c09f0fd 100644 (file)
@@ -1,5 +1,5 @@
-# idcache.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# idcache.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -9,6 +9,5 @@ dnl the same distribution terms as the rest of that program.
 AC_DEFUN([gl_IDCACHE],
 [
   dnl Prerequisites of lib/idcache.c.
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
 ])
index 487666eb5a54b461379e37b2f6fe0ce9afb5f772..edd2d9bce4ea6418af932dca1527e5d96e68ee60 100644 (file)
@@ -1,5 +1,5 @@
-# makepath.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# makepath.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -10,8 +10,7 @@ AC_DEFUN([gl_MAKEPATH],
 [
   dnl Prerequisites of lib/makepath.c.
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([AC_HEADER_STAT])
   AC_REQUIRE([jm_AFS])
 ])