Mercurial > hg > octave-jordi > gnulib-hg
changeset 4665:dc6d827f3011
Remove K&R cruft.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 09 Sep 2003 22:27:55 +0000 |
parents | 42147e1c0cee |
children | bb2816d0923f |
files | lib/mkdir.c lib/rmdir.c lib/savedir.c m4/mkdir-slash.m4 m4/savedir.m4 |
diffstat | 5 files changed, 14 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/mkdir.c +++ b/lib/mkdir.c @@ -1,6 +1,7 @@ /* On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. On those systems, this wrapper removes the trailing slash. - Copyright (C) 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 @@ -28,26 +29,12 @@ #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif - -#if HAVE_STRING_H -# include <string.h> -#else -# include <strings.h> -#endif +#include <stdlib.h> +#include <string.h> #include "dirname.h" #include "xalloc.h" -#ifndef HAVE_DECL_FREE -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_FREE -void free (); -#endif - /* This function is required at least for NetBSD 1.5.2. */ int
--- a/lib/rmdir.c +++ b/lib/rmdir.c @@ -1,5 +1,6 @@ /* BSD compatible remove directory function for System V - Copyright (C) 1988, 1990 Free Software Foundation, Inc. + + Copyright (C) 1988, 1990, 1999, 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 @@ -41,8 +42,7 @@ Return 0 if successful, -1 if not. */ int -rmdir (dpath) - char *dpath; +rmdir (char const *dpath) { pid_t cpid; int status;
--- a/lib/savedir.c +++ b/lib/savedir.c @@ -23,6 +23,8 @@ # include <config.h> #endif +#include "savedir.h" + #include <sys/types.h> #include <errno.h> @@ -52,13 +54,10 @@ # define CLOSEDIR(d) closedir (d) #endif -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <string.h> -#endif #include <stddef.h> +#include <stdlib.h> +#include <string.h> -#include "savedir.h" #include "xalloc.h" /* Return a freshly allocated string containing the filenames
--- a/m4/mkdir-slash.m4 +++ b/m4/mkdir-slash.m4 @@ -36,8 +36,4 @@ ]) # Prerequisites of lib/mkdir.c. -AC_DEFUN([gl_PREREQ_MKDIR], -[ - AC_CHECK_HEADERS_ONCE(stdlib.h string.h) - AC_CHECK_DECLS_ONCE(free) -]) +AC_DEFUN([gl_PREREQ_MKDIR], [:])
--- a/m4/savedir.m4 +++ b/m4/savedir.m4 @@ -1,5 +1,5 @@ -# savedir.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# savedir.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_SAVEDIR], [ dnl Prerequisites of lib/savedir.c. - AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID]) ])