aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2011-09-03 16:08:32 -0700
committerPaul Eggert2011-09-03 16:08:32 -0700
commit7f59d9c856de33b97bc3f2708dcc8dadf24ee040 (patch)
treeeb0c7bb18b57498965581881a5cccd5f1de48166 /lib
parentb49e353d9d01adbe60bc5d0b1658b4ef978b0b06 (diff)
downloademacs-7f59d9c856de33b97bc3f2708dcc8dadf24ee040.tar.gz
emacs-7f59d9c856de33b97bc3f2708dcc8dadf24ee040.zip
Merge from gnulib.
Diffstat (limited to 'lib')
-rw-r--r--lib/lstat.c5
-rw-r--r--lib/stat.c5
-rw-r--r--lib/unistd.in.h3
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/lstat.c b/lib/lstat.c
index b26065ede28..29fc6d25f90 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -17,6 +17,10 @@
17 17
18/* written by Jim Meyering */ 18/* written by Jim Meyering */
19 19
20/* If the user's config.h happens to include <sys/stat.h>, let it include only
21 the system's <sys/stat.h> here, so that orig_lstat doesn't recurse to
22 rpl_lstat. */
23#define __need_system_sys_stat_h
20#include <config.h> 24#include <config.h>
21 25
22#if !HAVE_LSTAT 26#if !HAVE_LSTAT
@@ -27,7 +31,6 @@ typedef int dummy;
27#else /* HAVE_LSTAT */ 31#else /* HAVE_LSTAT */
28 32
29/* Get the original definition of lstat. It might be defined as a macro. */ 33/* Get the original definition of lstat. It might be defined as a macro. */
30# define __need_system_sys_stat_h
31# include <sys/types.h> 34# include <sys/types.h>
32# include <sys/stat.h> 35# include <sys/stat.h>
33# undef __need_system_sys_stat_h 36# undef __need_system_sys_stat_h
diff --git a/lib/stat.c b/lib/stat.c
index f07370dd06b..6c354d1d357 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -16,10 +16,13 @@
16 16
17/* written by Eric Blake */ 17/* written by Eric Blake */
18 18
19/* If the user's config.h happens to include <sys/stat.h>, let it include only
20 the system's <sys/stat.h> here, so that orig_stat doesn't recurse to
21 rpl_stat. */
22#define __need_system_sys_stat_h
19#include <config.h> 23#include <config.h>
20 24
21/* Get the original definition of stat. It might be defined as a macro. */ 25/* Get the original definition of stat. It might be defined as a macro. */
22#define __need_system_sys_stat_h
23#include <sys/types.h> 26#include <sys/types.h>
24#include <sys/stat.h> 27#include <sys/stat.h>
25#undef __need_system_sys_stat_h 28#undef __need_system_sys_stat_h
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 769ecf0d43f..119cd142f43 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -85,7 +85,8 @@
85/* mingw declares getcwd in <io.h>, not in <unistd.h>. */ 85/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
86#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ 86#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
87 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) 87 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
88# include <io.h> 88# include <io.h> /* mingw32, mingw64 */
89# include <direct.h> /* mingw64 */
89#endif 90#endif
90 91
91/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. 92/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.