Remove all traces of __CYGWIN_USE_BIG_TYPES__.
* include/cygwin/config.h: Move Cygwin-specific build flags from newlib's sys/config.h here. Add a comment.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
sys/config.h before. This way we can manaage our configuration
|
||||
setting without bothering newlib.
|
||||
|
||||
Copyright 2003, 2007, 2008, 2009 Red Hat, Inc.
|
||||
Copyright 2003, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
Written by C. Vinschen.
|
||||
|
||||
This file is part of Cygwin.
|
||||
@@ -44,17 +44,17 @@ extern char *_tlsbase __asm__ ("%fs:4");
|
||||
#endif /* _COMPILING_NEWLIB */
|
||||
|
||||
#define __FILENAME_MAX__ 4096 /* Keep in sync with PATH_MAX in limits.h. */
|
||||
|
||||
/* The following block of macros is required to build newlib correctly for
|
||||
Cygwin. Changing them in applications has no or not the desired effect.
|
||||
Just leave them alone. */
|
||||
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
||||
#define __LARGE64_FILES 1
|
||||
#define __CYGWIN_USE_BIG_TYPES__ 1
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
/* __USE_INTERNAL_STAT64 is needed when building newlib for Cygwin.
|
||||
It must be set when __CYGWIN_USE_BIG_TYPES__ is set. In this case
|
||||
newlib will call the 64 bit stat calls internally. Otherwise the
|
||||
struct stat used in newlib is not matching the struct stat used in
|
||||
Cygwin. */
|
||||
#define __USE_INTERNAL_STAT64 1
|
||||
#endif
|
||||
#define __LINUX_ERRNO_EXTENSIONS__ 1
|
||||
#define _MB_EXTENDED_CHARSETS_ALL 1
|
||||
#define __HAVE_LOCALE_INFO__ 1
|
||||
#define _WANT_C99_TIME_FORMATS 1
|
||||
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
|
||||
#define __EXPORT __declspec(dllexport)
|
||||
#define __IMPORT
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* cygwin/stat.h
|
||||
|
||||
Copyright 2002, 2007 Red Hat Inc.
|
||||
Copyright 2002, 2007, 2010 Red Hat Inc.
|
||||
Written by Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
This file is part of Cygwin.
|
||||
@@ -74,19 +74,13 @@ struct stat
|
||||
timestruc_t st_ctim;
|
||||
blksize_t st_blksize;
|
||||
blkcnt_t st_blocks;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
timestruc_t st_birthtim;
|
||||
#else
|
||||
long st_spare4[2];
|
||||
#endif
|
||||
};
|
||||
|
||||
#define st_atime st_atim.tv_sec
|
||||
#define st_mtime st_mtim.tv_sec
|
||||
#define st_ctime st_ctim.tv_sec
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
#define st_birthtime st_birthtim.tv_sec
|
||||
#endif
|
||||
|
||||
/* POSIX IPC objects are not implemented as distinct file types, so the
|
||||
below macros have to return 0. The expression is supposed to catch
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* types.h
|
||||
|
||||
Copyright 2001, 2002, 2003, 2005 Red Hat Inc.
|
||||
Copyright 2001, 2002, 2003, 2005, 2006, 2010 Red Hat Inc.
|
||||
Written by Robert Collins <rbtcollins@hotmail.com>
|
||||
|
||||
This file is part of Cygwin.
|
||||
@@ -33,11 +33,7 @@ typedef struct timespec timestruc_t;
|
||||
|
||||
#ifndef __off_t_defined
|
||||
#define __off_t_defined
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef _off64_t off_t;
|
||||
#else
|
||||
typedef _off_t off_t;
|
||||
#endif
|
||||
#endif /*__off_t_defined*/
|
||||
|
||||
typedef __loff_t loff_t;
|
||||
@@ -46,11 +42,7 @@ typedef __loff_t loff_t;
|
||||
#define __dev_t_defined
|
||||
typedef short __dev16_t;
|
||||
typedef unsigned long __dev32_t;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef __dev32_t dev_t;
|
||||
#else
|
||||
typedef __dev16_t dev_t;
|
||||
#endif
|
||||
#endif /*__dev_t_defined*/
|
||||
|
||||
#ifndef __blksize_t_defined
|
||||
@@ -62,11 +54,7 @@ typedef long blksize_t;
|
||||
#define __blkcnt_t_defined
|
||||
typedef long __blkcnt32_t;
|
||||
typedef long long __blkcnt64_t;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef __blkcnt64_t blkcnt_t;
|
||||
#else
|
||||
typedef __blkcnt32_t blkcnt_t;
|
||||
#endif
|
||||
#endif /*__blkcnt_t_defined*/
|
||||
|
||||
#ifndef __fsblkcnt_t_defined
|
||||
@@ -83,33 +71,21 @@ typedef unsigned long fsfilcnt_t;
|
||||
#define __uid_t_defined
|
||||
typedef unsigned short __uid16_t;
|
||||
typedef unsigned long __uid32_t;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef __uid32_t uid_t;
|
||||
#else
|
||||
typedef __uid16_t uid_t;
|
||||
#endif
|
||||
#endif /*__uid_t_defined*/
|
||||
|
||||
#ifndef __gid_t_defined
|
||||
#define __gid_t_defined
|
||||
typedef unsigned short __gid16_t;
|
||||
typedef unsigned long __gid32_t;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef __gid32_t gid_t;
|
||||
#else
|
||||
typedef __gid16_t gid_t;
|
||||
#endif
|
||||
#endif /*__gid_t_defined*/
|
||||
|
||||
#ifndef __ino_t_defined
|
||||
#define __ino_t_defined
|
||||
typedef unsigned long __ino32_t;
|
||||
typedef unsigned long long __ino64_t;
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
typedef __ino64_t ino_t;
|
||||
#else
|
||||
typedef __ino32_t ino_t;
|
||||
#endif
|
||||
#endif /*__ino_t_defined*/
|
||||
|
||||
/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
|
||||
@@ -142,12 +118,7 @@ struct flock {
|
||||
short l_whence; /* flag to choose starting offset */
|
||||
off_t l_start; /* relative offset, in bytes */
|
||||
off_t l_len; /* length, in bytes; 0 means lock to EOF */
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
pid_t l_pid; /* returned with F_GETLK */
|
||||
#else
|
||||
short l_pid; /* returned with F_GETLK */
|
||||
short l_xxx; /* reserved for future use */
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef __key_t_defined
|
||||
|
Reference in New Issue
Block a user