aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stat.c
diff options
context:
space:
mode:
authorPaul Eggert2012-05-26 16:14:36 -0700
committerPaul Eggert2012-05-26 16:14:36 -0700
commitcaf8a9b2b301aba06735d403317b75b41df59bfe (patch)
treebfafb3cc0cf8a2f2394b4ed721e7c3d4891b78ab /lib/stat.c
parentfe453991eafc32a890297a2003ac532b9f579f92 (diff)
downloademacs-caf8a9b2b301aba06735d403317b75b41df59bfe.tar.gz
emacs-caf8a9b2b301aba06735d403317b75b41df59bfe.zip
Merge from gnulib.
Fixes: debbugs:11527
Diffstat (limited to 'lib/stat.c')
-rw-r--r--lib/stat.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/stat.c b/lib/stat.c
index 1397aa93290..1fc633eeef0 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -1,5 +1,5 @@
1/* Work around platform bugs in stat. 1/* Work around platform bugs in stat.
2 Copyright (C) 2009-2011 Free Software Foundation, Inc. 2 Copyright (C) 2009-2012 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
@@ -27,6 +27,20 @@
27#include <sys/stat.h> 27#include <sys/stat.h>
28#undef __need_system_sys_stat_h 28#undef __need_system_sys_stat_h
29 29
30#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
31# if _GL_WINDOWS_64_BIT_ST_SIZE
32# define stat _stati64
33# define REPLACE_FUNC_STAT_DIR 1
34# undef REPLACE_FUNC_STAT_FILE
35# elif REPLACE_FUNC_STAT_FILE
36/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a.
37 Bypass it. */
38# define stat _stat
39# define REPLACE_FUNC_STAT_DIR 1
40# undef REPLACE_FUNC_STAT_FILE
41# endif
42#endif
43
30static inline int 44static inline int
31orig_stat (const char *filename, struct stat *buf) 45orig_stat (const char *filename, struct stat *buf)
32{ 46{