newlib/newlib/libc/include/machine
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
..
_arc4random.h Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
_default_types.h * libc/include/machine/_default_types.h: Define unsigned type using 2014-03-04 08:05:39 +00:00
_time.h Move kernel dependent parts of <sys/time.h> 2016-04-08 11:34:42 +02:00
_types.h 2007-09-07 Patrick Mansfield <patmans@us.ibm.com> 2007-09-07 21:16:25 +00:00
ansi.h 2001-03-02 Jeff Johnston <jjohnstn@redhat.com> 2001-03-02 23:13:04 +00:00
endian.h 2010-06-18 Pavel Pisa <ppisa4lists@pikron.com> 2010-06-18 16:26:25 +00:00
fastmath.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
ieeefp.h Add support for ft32 to newlib. 2015-09-04 14:37:37 -04:00
malloc.h 2002-04-19 Jeff Johnston <jjohnstn@redhat.com> 2002-04-19 19:16:22 +00:00
param.h 2004-05-07 Jeff Johnston <jjohnstn@redhat.com> 2004-05-07 20:39:57 +00:00
setjmp-dj.h 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:26:39 +00:00
setjmp.h Add Intel MCU target 2016-04-04 16:32:07 +02:00
stdlib.h 2002-04-19 Jeff Johnston <jjohnstn@redhat.com> 2002-04-19 19:16:22 +00:00
termios.h 2002-05-28 Jeff Johnston <jjohnstn@redhat.com> 2002-05-28 22:26:36 +00:00
time.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
types.h Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00