projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
dirname.c
diff --git
a/lib/dirname.c
b/lib/dirname.c
index
82deea7
..
cb53eb4
100644
(file)
--- a/
lib/dirname.c
+++ b/
lib/dirname.c
@@
-15,14
+15,27
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+ using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+ (which it would do because it found this file in $srcdir). */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#ifdef STDC_HEADERS
#include <stdlib.h>
#else
char *malloc ();
#endif
#ifdef STDC_HEADERS
#include <stdlib.h>
#else
char *malloc ();
#endif
-#if defined(
USG) || defined(STDC_HEADERS
)
+#if defined(
STDC_HEADERS) || defined(HAVE_STRING_H
)
#include <string.h>
#include <string.h>
+#ifndef rindex
#define rindex strrchr
#define rindex strrchr
+#endif
#else
#include <strings.h>
#endif
#else
#include <strings.h>
#endif