projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated from FSF
[gnulib.git]
/
lib
/
makepath.c
diff --git
a/lib/makepath.c
b/lib/makepath.c
index
5c61124
..
3ca5c97
100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-49,9
+49,11
@@
char *alloca ();
extern int errno;
#endif
extern int errno;
#endif
-#if defined(
USG) || defined(STDC_HEADERS
)
+#if defined(
STDC_HEADERS) || defined(HAVE_STRING_H
)
#include <string.h>
#include <string.h>
+#ifndef index
#define index strchr
#define index strchr
+#endif
#else
#include <strings.h>
#endif
#else
#include <strings.h>
#endif
@@
-127,7
+129,7
@@
make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string)
slash = dirpath;
while (*slash == '/')
slash++;
slash = dirpath;
while (*slash == '/')
slash++;
- while (
slash = index (slash, '/'
))
+ while (
(slash = index (slash, '/')
))
{
*slash = '\0';
if (stat (dirpath, &stats))
{
*slash = '\0';
if (stat (dirpath, &stats))