projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ftruncate: Un-deprecate, concentrate on Win32 support.
[gnulib.git]
/
lib
/
lstat.c
diff --git
a/lib/lstat.c
b/lib/lstat.c
index
b26065e
..
d786288
100644
(file)
--- a/
lib/lstat.c
+++ b/
lib/lstat.c
@@
-17,6
+17,10
@@
/* written by Jim Meyering */
/* written by Jim Meyering */
+/* If the user's config.h happens to include <sys/stat.h>, let it include only
+ the system's <sys/stat.h> here, so that orig_lstat doesn't recurse to
+ rpl_lstat. */
+#define __need_system_sys_stat_h
#include <config.h>
#if !HAVE_LSTAT
#include <config.h>
#if !HAVE_LSTAT
@@
-27,7
+31,6
@@
typedef int dummy;
#else /* HAVE_LSTAT */
/* Get the original definition of lstat. It might be defined as a macro. */
#else /* HAVE_LSTAT */
/* Get the original definition of lstat. It might be defined as a macro. */
-# define __need_system_sys_stat_h
# include <sys/types.h>
# include <sys/stat.h>
# undef __need_system_sys_stat_h
# include <sys/types.h>
# include <sys/stat.h>
# undef __need_system_sys_stat_h
@@
-39,7
+42,10
@@
orig_lstat (const char *filename, struct stat *buf)
}
/* Specification. */
}
/* Specification. */
-# include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+ eliminates this include because of the preliminary #include <sys/stat.h>
+ above. */
+# include "sys/stat.h"
# include <string.h>
# include <errno.h>
# include <string.h>
# include <errno.h>