newlib-cygwin/newlib/libc/sys/linux/sys
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
..
_types.h Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
cdefs.h 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:27:00 +00:00
dirent.h 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com> 2013-11-21 16:44:39 +00:00
dlfcn.h
elfclass.h
errno.h
event.h
fcntl.h
features.h
file.h
ioccom.h 2006-03-29 Shaun Jackman <sjackman@gmail.com> 2006-03-29 22:09:56 +00:00
ioctl.h 2008-05-22 Jeff Johnston <jjohnstn@redhat.com> 2008-05-22 21:30:28 +00:00
libc-lock.h 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 22:27:00 +00:00
libc-tsd.h
link.h
linux_time.h
lock.h 2005-10-26 Shaun Jackman <sjackman@gmail.com> 2005-10-26 22:16:34 +00:00
param.h
resource.h
select.h
signal.h * libc/include/signal.h (psignal): Declare. 2011-05-04 11:26:22 +00:00
socket.h 2008-05-22 Jeff Johnston <jjohnstn@redhat.com> 2008-05-22 21:30:28 +00:00
sockio.h
stat.h 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-21 16:35:47 +00:00
stdint.h 2008-10-02 Jeff Johnston <jjohnstn@redhat.com> 2008-10-02 17:29:11 +00:00
stdio.h
string.h 2005-01-24 Jeff Johnston <jjohnstn@redhat.com> 2005-01-24 18:46:09 +00:00
termios.h
time.h
types.h Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
unistd.h headers: properly decorate attributes 2014-08-01 15:44:51 +00:00
utime.h
utmp.h
utsname.h
wait.h