newlib-cygwin/winsup/cygwin/include
Sebastian Huber 477463a201 Eliminate use of Newlib-specific <machine/types.h>
This change solves a glibc/BSD compatibility problem.

glibc and BSD use double underscore types for internal types.  The Linux
port of Newlib uses some glibc provided internal type definitions which
are not protected by guard defines, e.g. __off_t.  To avoid a conflict
Newlib uses single underscore types for some internal types, e.g.
_off_t.  However, for BSD compatibility we have to define the internal
types with double underscore names in <sys/_types.h>.

The header file <machine/types.h> is Newlib-specific.  It was used
instead of <sys/_types.h> to provide the internal type definitions
_CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t.  Move
these definitions to <sys/_types.h> (there exist two instances of this
file, one for Linux and one for all other targets).  This makes the
_HAVE_SYSTYPES configuration define obsolete (could possibly break the
__RDOS__ target).  Use the standard <sys/_types.h> include throughout.

Move __loff_t defintion to default (non-Linux) <sys/_types.h>.  Define
it via _off64_t to avoid a dependency on the compiler.

Provide the __off_t definition via default (non-Linux) <sys/_types.h>
based on _off_t for all systems except Cygwin.  For Cygwin use _off64_t.
Define off_t via __off_t.

Provide the __pid_t definition via default (non-Linux) <sys/_types.h>.
This prevents a potential __pid_t and pid_t incompatibility.  Add BSD
guard defines for pid_t.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-13 13:30:27 +02:00
..
acl Implement POSIX.1e ACL functions 2016-03-08 13:56:40 +01:00
arpa Remove spurious execute permissions from some Cygwin source and text files 2015-10-27 16:10:37 +00:00
asm Fix FIONBIO comments 2016-03-24 16:12:28 +01:00
attr
bits * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
cygwin Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
machine Allow machine-dependent arc4 locking 2016-03-20 21:30:08 +01:00
net
netinet fix typo in netinit/ip.h 2016-03-30 16:51:40 +02:00
sys Fix FIONBIO comments 2016-03-24 16:12:28 +01:00
a.out.h * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
byteswap.h Cygwin: define byteswap.h inlines as macros 2016-03-17 21:09:23 -05:00
dlfcn.h
elf.h
endian.h Feature test macros overhaul: Cygwin headers 2016-03-17 21:09:22 -05:00
err.h
error.h
fcntl.h * include/fcntl.h: Move all open flags (except O_NDELAY) to newlib's 2014-11-25 11:42:20 +00:00
features.h
fenv.h fenv.h: Change fexcept_t to integral type for compatibility 2016-03-30 12:55:42 +02:00
fnmatch.h Feature test macros overhaul: fnmatch.h 2016-03-17 21:08:54 -05:00
fts.h * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
ftw.h * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
getopt.h
glob.h Feature test macros overhaul: Cygwin headers 2016-03-17 21:09:22 -05:00
icmp.h
ifaddrs.h getifaddrs: Return pointer to extended interface info in ifa_data member 2016-03-10 18:00:00 +01:00
io.h * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
lastlog.h
limits.h Feature test macros overhaul: limits.h 2016-03-17 21:08:57 -05:00
mapi.h
memory.h
mntent.h * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
monetary.h
mqueue.h
netdb.h Drop usage of old-age BSD types in generically used Cygwin headers 2016-03-24 15:55:25 +01:00
paths.h
poll.h
process.h
pthread.h Feature test macros overhaul: Cygwin pthread.h 2016-04-04 10:25:32 -05:00
pty.h
regex.h
resolv.h Remove spurious execute permissions from some Cygwin source and text files 2015-10-27 16:10:37 +00:00
search.h
semaphore.h
sysexits.h
syslog.h
termio.h
tzfile.h
ucontext.h Implement getcontext, setcontext, makecontext, swapcontext 2015-07-17 14:31:12 +02:00
utmpx.h Convert utmp{x}name to int, return useful value. Define _PATH_UTMPX 2016-01-07 15:40:40 +01:00
wait.h