diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-04-23 09:44:36 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-04-23 09:44:36 +0000 |
commit | 61522196c71593da09572fce9af9e0d7dad61bc3 (patch) | |
tree | 9bf74facd67974fa2f780d6ce68b14eb7a94e371 /winsup/cygwin/glob.cc | |
parent | 1875ee55d31d3673059373c8f9837bf98f93c713 (diff) | |
download | cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.tar.gz cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.tar.bz2 cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.zip |
* Merge in cygwin-64bit-branch.
Diffstat (limited to 'winsup/cygwin/glob.cc')
-rw-r--r-- | winsup/cygwin/glob.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/glob.cc b/winsup/cygwin/glob.cc index c02901fc6..296cd7fbc 100644 --- a/winsup/cygwin/glob.cc +++ b/winsup/cygwin/glob.cc @@ -105,8 +105,6 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.28 2010/05/12 17:44:00 gordon Ex #define getuid() getuid32 () #define issetugid() (cygheap->user.issetuid ()) -#define stat __stat64 - #define CCHAR(c) (ignore_case_with_glob ? towlower (CHAR (c)) : CHAR (c)) #define Cchar(c) (ignore_case_with_glob ? towlower (c) : (c)) #endif @@ -858,8 +856,11 @@ g_opendir(Char *str, glob_t *pglob) return(opendir(buf)); } +#ifdef __x86_64__ +#define CYGWIN_gl_stat(sfptr) ((*pglob->sfptr) (buf, sb)) +#else static void -stat32_to_stat64 (struct __stat32 *src, struct __stat64 *dst) +stat32_to_stat64 (struct __stat32 *src, struct stat *dst) { dst->st_dev = src->st_dev; dst->st_ino = src->st_ino; @@ -882,10 +883,11 @@ stat32_to_stat64 (struct __stat32 *src, struct __stat64 *dst) struct __stat32 lsb; \ if (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES) \ ret = (*pglob->sfptr) (buf, sb); \ - else if (!(ret = (*pglob->sfptr) (buf, (struct __stat64 *) &lsb))) \ + else if (!(ret = (*pglob->sfptr) (buf, (struct stat *) &lsb))) \ stat32_to_stat64 (&lsb, sb); \ ret; \ }) +#endif static int g_lstat(Char *fn, struct stat *sb, glob_t *pglob) |