projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid endless recursions if config.h includes some header files.
[gnulib.git]
/
lib
/
stat.c
diff --git
a/lib/stat.c
b/lib/stat.c
index
f07370d
..
6c354d1
100644
(file)
--- a/
lib/stat.c
+++ b/
lib/stat.c
@@
-16,10
+16,13
@@
/* written by Eric Blake */
/* written by Eric Blake */
+/* 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_stat doesn't recurse to
+ rpl_stat. */
+#define __need_system_sys_stat_h
#include <config.h>
/* Get the original definition of stat. It might be defined as a macro. */
#include <config.h>
/* Get the original definition of stat. 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