summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-10 08:28:38 +0000
committerJim Meyering <jim@meyering.net>2003-09-10 08:28:38 +0000
commit3d82b922c123b835ac65e2c165a7057f7b378c0b (patch)
tree2b379aeb40bbf7bdf8bc81705132d64f88a00f4f
parent02889673a1e6864e27558954f32d8759a860b43c (diff)
downloadcoreutils-3d82b922c123b835ac65e2c165a7057f7b378c0b.tar.xz
Include <string.h> unconditionally.
-rw-r--r--lib/basename.c8
-rw-r--r--lib/dirname.c8
-rw-r--r--lib/stripslash.c8
3 files changed, 8 insertions, 16 deletions
diff --git a/lib/basename.c b/lib/basename.c
index 54f037ed5..5ff298933 100644
--- 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.
diff --git a/lib/dirname.c b/lib/dirname.c
index 131af8bbd..815192a66 100644
--- 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 <string.h>
#include "xalloc.h"
/* Return the length of `dirname (PATH)', or zero if PATH is
diff --git a/lib/stripslash.c b/lib/stripslash.c
index 73be73732..c6b319e69 100644
--- 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.