changeset 4633:74b0d8b988f7

Remove K&R cruft.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 08 Sep 2003 23:08:47 +0000
parents 7cf472970457
children ceebc07ec450
files lib/basename.c lib/dirname.c lib/stripslash.c m4/dirname.m4
diffstat 4 files changed, 11 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/lib/basename.c
+++ b/lib/basename.c
@@ -1,5 +1,7 @@
 /* basename.c -- return the last element in a path
-   Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright (C) 1990, 1998, 1999, 2000, 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
@@ -19,10 +21,8 @@
 # include <config.h>
 #endif
 
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#endif
 #include "dirname.h"
+#include <string.h>
 
 /* In general, we can't use the builtin `basename' function if available,
    since it has different meanings in different environments.
--- a/lib/dirname.c
+++ b/lib/dirname.c
@@ -1,5 +1,5 @@
 /* dirname.c -- return all but the last element in a path
-   Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998, 2000, 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
@@ -19,11 +19,9 @@
 # include <config.h>
 #endif
 
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#endif
+#include "dirname.h"
 
-#include "dirname.h"
+#include <string.h>
 #include "xalloc.h"
 
 /* Return the length of `dirname (PATH)', or zero if PATH is
--- a/lib/stripslash.c
+++ b/lib/stripslash.c
@@ -1,5 +1,5 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
-   Copyright (C) 1990, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990, 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
@@ -19,12 +19,6 @@
 # include <config.h>
 #endif
 
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
 #include "dirname.h"
 
 /* Remove trailing slashes from PATH.
--- a/m4/dirname.m4
+++ b/m4/dirname.m4
@@ -1,5 +1,5 @@
-# dirname.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# dirname.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
@@ -11,15 +11,5 @@
   dnl Prerequisites of lib/dirname.h.
   AC_REQUIRE([jm_AC_DOS])
 
-  dnl Prerequisites of lib/dirname.c.
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h)
-
-  dnl Prerequisites of lib/basename.c.
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h)
-
-  dnl Prerequisites of lib/stripslash.c.
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h)
+  dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c.
 ])