Remove K&R cruft.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 06:53:45 +0000 (06:53 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 06:53:45 +0000 (06:53 +0000)
lib/save-cwd.c
lib/sha.c
lib/stat.c
lib/xgetcwd.c
m4/getcwd.m4
m4/save-cwd.m4
m4/xgetcwd.m4

index b7b85a1..6fb39f0 100644 (file)
 #endif
 
 #include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
index 150bf0e..b645bf4 100644 (file)
--- a/lib/sha.c
+++ b/lib/sha.c
 # include <config.h>
 #endif
 
+#include "sha.h"
+
 #include <sys/types.h>
 
-#if STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
+#include <stdlib.h>
+#include <string.h>
 
-#include "md5.h"
-#include "sha.h"
 #include "unlocked-io.h"
 
 /*
index 284da0c..f8fc82e 100644 (file)
 extern int errno;
 #endif
 #if defined LSTAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
+# include <stdlib.h>
 # include <string.h>
 
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-
 # ifdef STAT_MACROS_BROKEN
 #  undef S_ISLNK
 # endif
@@ -49,13 +46,6 @@ extern int errno;
 #  endif
 # endif
 
-# ifndef HAVE_DECL_FREE
-"this configure-time declaration test was not run"
-# endif
-# if !HAVE_DECL_FREE
-void free ();
-# endif
-
 # include "xalloc.h"
 
 /* lstat works differently on Linux and Solaris systems.  POSIX (see
index ed42520..2089b88 100644 (file)
@@ -28,10 +28,8 @@ extern int errno;
 #endif
 
 #include <sys/types.h>
+#include <stdlib.h>
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 7790dde..159aa2b 100644 (file)
@@ -1,6 +1,6 @@
 # getcwd.m4 - check whether getcwd (NULL, 0) allocates memory for result
 
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 AC_DEFUN([AC_FUNC_GETCWD_NULL],
   [
-   AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+   AC_CHECK_HEADERS_ONCE(unistd.h)
    AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
      [ac_cv_func_getcwd_null],
      [AC_TRY_RUN(
         [
-#       ifdef HAVE_STDLIB_H
-#        include <stdlib.h>
-#       endif
+#       include <stdlib.h>
 #       ifdef HAVE_UNISTD_H
 #        include <unistd.h>
 #       endif
index fcafca9..f127222 100644 (file)
@@ -1,5 +1,5 @@
-# save-cwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# save-cwd.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,7 +9,6 @@ dnl the same distribution terms as the rest of that program.
 AC_DEFUN([gl_SAVE_CWD],
 [
   dnl Prerequisites for lib/save-cwd.c.
-  AC_REQUIRE([AC_HEADER_STDC])
   AC_CHECK_HEADERS_ONCE(fcntl.h unistd.h)
   AC_CHECK_FUNCS(fchdir)
 ])
index efd30af..48b77a1 100644 (file)
@@ -1,5 +1,5 @@
-# xgetcwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# xgetcwd.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,7 +9,7 @@ dnl the same distribution terms as the rest of that program.
 AC_DEFUN([gl_XGETCWD],
 [
   dnl Prerequisites of lib/xgetcwd.c.
-  AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS(getcwd)
   AC_FUNC_GETCWD_NULL
 ])