Mercurial > hg > octave-nkf > gnulib-hg
changeset 4675:7135d3d3d962
Remove K&R cruft.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 10 Sep 2003 06:53:45 +0000 |
parents | 092d9a2797a7 |
children | 7779e842b2e1 |
files | lib/save-cwd.c lib/sha.c lib/stat.c lib/xgetcwd.c m4/getcwd.m4 m4/save-cwd.m4 m4/xgetcwd.m4 |
diffstat | 7 files changed, 15 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/save-cwd.c +++ b/lib/save-cwd.c @@ -22,10 +22,7 @@ #endif #include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif +#include <stdlib.h> #if HAVE_UNISTD_H # include <unistd.h>
--- a/lib/sha.c +++ b/lib/sha.c @@ -11,19 +11,13 @@ # 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" /*
--- a/lib/stat.c +++ b/lib/stat.c @@ -31,12 +31,9 @@ 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 @@ # 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
--- a/lib/xgetcwd.c +++ b/lib/xgetcwd.c @@ -28,10 +28,8 @@ #endif #include <sys/types.h> +#include <stdlib.h> -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif #if HAVE_UNISTD_H # include <unistd.h> #endif
--- a/m4/getcwd.m4 +++ b/m4/getcwd.m4 @@ -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 @@ -20,14 +20,12 @@ 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
--- a/m4/save-cwd.m4 +++ b/m4/save-cwd.m4 @@ -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 @@ 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) ])
--- a/m4/xgetcwd.m4 +++ b/m4/xgetcwd.m4 @@ -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 @@ 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 ])