summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-04-23 09:42:25 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-04-23 09:42:25 +0000
commit1875ee55d31d3673059373c8f9837bf98f93c713 (patch)
tree5b6e27ca6f7db52e5d041972710d7215e0bba2ff /newlib/libc/include/sys
parentbca6ce4282faeccaa0e380858b0a067dbe01f137 (diff)
downloadcygnal-1875ee55d31d3673059373c8f9837bf98f93c713.tar.gz
cygnal-1875ee55d31d3673059373c8f9837bf98f93c713.tar.bz2
cygnal-1875ee55d31d3673059373c8f9837bf98f93c713.zip
Port newlib to x86_64-pc-cygwin.
* libc/include/sys/features.h: Redefine compilation environment definitions for Cygwin to cover 64 bit Cygwin. * libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin. * libc/include/machine/setjmp.h: Change definition of _JBLEN to allow different values for 32 bit and 64 bit Cygwin. * libc/include/reent.h (stat64): Define as stat under Cygwin, instead of as __stat64. Undef stat64 if not building Newlib. * libc/include/sys/stat.h (stat64): Define as stat under Cygwin.
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/features.h12
-rw-r--r--newlib/libc/include/sys/stat.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index b5e003b5f..a3ba513bf 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -173,12 +173,18 @@ extern "C" {
#define _POSIX2_SW_DEV 200112L
#define _POSIX2_UPE 200112L
#define _POSIX_V6_ILP32_OFF32 -1
-#define _XBS5_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
+#ifdef __LP64__
+#define _POSIX_V6_ILP32_OFFBIG -1
+#define _POSIX_V6_LP64_OFF64 1
+#define _POSIX_V6_LPBIG_OFFBIG 1
+#else
#define _POSIX_V6_ILP32_OFFBIG 1
-#define _XBS5_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
#define _POSIX_V6_LP64_OFF64 -1
-#define _XBS5_LP64_OFF64 _POSIX_V6_LP64_OFF64
#define _POSIX_V6_LPBIG_OFFBIG -1
+#endif
+#define _XBS5_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
+#define _XBS5_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
+#define _XBS5_LP64_OFF64 _POSIX_V6_LP64_OFF64
#define _XBS5_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
#define _XOPEN_CRYPT 1
#define _XOPEN_ENH_I18N 1
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index fa2036dd3..937bcacd2 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -19,7 +19,7 @@ extern "C" {
#ifdef __CYGWIN__
#include <cygwin/stat.h>
#ifdef _COMPILING_NEWLIB
-#define stat64 __stat64
+#define stat64 stat
#endif
#else
struct stat