diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-09-03 16:08:32 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-09-03 16:08:32 -0700 |
commit | 7b5527c35e905642c9c7e3ebf9a99cf8b2a938b4 (patch) | |
tree | 60a7cdf4b55584d0a6488af75a3e582d5524f57f /lib | |
parent | 343d48068877f58e377af8b797cc2be94e13c479 (diff) | |
download | emacs-7b5527c35e905642c9c7e3ebf9a99cf8b2a938b4.tar.gz |
Merge from gnulib.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lstat.c | 5 | ||||
-rw-r--r-- | lib/stat.c | 5 | ||||
-rw-r--r-- | lib/unistd.in.h | 3 |
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 @@ /* 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 @@ -27,7 +31,6 @@ typedef int dummy; #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 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 @@ /* 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. */ -#define __need_system_sys_stat_h #include <sys/types.h> #include <sys/stat.h> #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 @@ /* mingw declares getcwd in <io.h>, not in <unistd.h>. */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include <io.h> +# include <io.h> /* mingw32, mingw64 */ +# include <direct.h> /* mingw64 */ #endif /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. |