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:
parent
6bcdc0df58
commit
627ef695f2
|
@ -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
|
||||
|
|
|
@ -125,8 +125,6 @@ typedef struct _ftsent {
|
|||
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
struct __stat64 *fts_statp; /* stat(2) information */
|
||||
#elif defined (__CYGWIN__) && !defined (__CYGWIN_USE_BIG_TYPES__)
|
||||
#error "fts requires __CYGWIN_USE_BIG_TYPES__"
|
||||
#else
|
||||
struct stat *fts_statp; /* stat(2) information */
|
||||
#endif
|
||||
|
|
|
@ -59,8 +59,6 @@ __BEGIN_DECLS
|
|||
int ftw(const char *, int (*)(const char *, const struct __stat64 *, int), int);
|
||||
int nftw(const char *, int (*)(const char *, const struct __stat64 *, int,
|
||||
struct FTW *), int, int);
|
||||
#elif defined (__CYGWIN__) && !defined (__CYGWIN_USE_BIG_TYPES__)
|
||||
#error "ftw requires __CYGWIN_USE_BIG_TYPES__"
|
||||
#else
|
||||
int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
|
||||
int nftw(const char *, int (*)(const char *, const struct stat *, int,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Posix dirent.h for WIN32.
|
||||
|
||||
Copyright 2001, 2002, 2003, 2005, 2006, 2007 Red Hat, Inc.
|
||||
Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2010 Red Hat, Inc.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
|
@ -17,7 +17,6 @@
|
|||
#define __DIRENT_VERSION 2
|
||||
|
||||
#pragma pack(push,4)
|
||||
#if defined(__INSIDE_CYGWIN__) || defined (__CYGWIN_USE_BIG_TYPES__)
|
||||
#define _DIRENT_HAVE_D_TYPE
|
||||
struct dirent
|
||||
{
|
||||
|
@ -28,16 +27,6 @@ struct dirent
|
|||
__uint32_t __d_internal1;
|
||||
char d_name[NAME_MAX + 1];
|
||||
};
|
||||
#else
|
||||
struct dirent
|
||||
{
|
||||
long d_version;
|
||||
long d_reserved[2];
|
||||
long d_fd;
|
||||
ino_t d_ino;
|
||||
char d_name[NAME_MAX + 1];
|
||||
};
|
||||
#endif
|
||||
#pragma pack(pop)
|
||||
|
||||
#define __DIRENT_COOKIE 0xdede4242
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* sys/sysmacros.h
|
||||
|
||||
Copyright 1998, 2001 Red Hat, Inc.
|
||||
Copyright 1998, 2001, 2010 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
|
@ -11,14 +11,8 @@ details. */
|
|||
#ifndef _SYS_SYSMACROS_H
|
||||
#define _SYS_SYSMACROS_H
|
||||
|
||||
#ifdef __CYGWIN_USE_BIG_TYPES__
|
||||
#define major(dev) ((int)(((dev) >> 16) & 0xffff))
|
||||
#define minor(dev) ((int)((dev) & 0xffff))
|
||||
#define makedev(major, minor) (((major) << 16) | ((minor) & 0xffff))
|
||||
#else
|
||||
#define major(dev) ((int)(((dev) >> 8) & 0xff))
|
||||
#define minor(dev) ((int)((dev) & 0xff))
|
||||
#define makedev(major, minor) (((major) << 8) | ((minor) & 0xff))
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_SYSMACROS_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ipc.cc: Single unix specification IPC interface for Cygwin
|
||||
|
||||
Copyright 2001, 2002, 2003 Red Hat, Inc.
|
||||
Copyright 2001, 2002, 2003, 2010 Red Hat, Inc.
|
||||
|
||||
Originally written by Robert Collins <robert.collins@hotmail.com>
|
||||
Updated to 64 bit key_t by Charles Wilson <cygwin@cwilson.fastmail.fm>
|
||||
|
@ -26,7 +26,7 @@ ftok (const char *path, int id)
|
|||
return (key_t) -1;
|
||||
}
|
||||
|
||||
/* Since __CYGWIN_USE_BIG_TYPES__,
|
||||
/* Since Cygwin 1.5
|
||||
dev_t is 32bits for cygwin
|
||||
ino_t is 64bits for cygwin
|
||||
and we need 8 bits for the id.
|
||||
|
|
Loading…
Reference in New Issue