newlib/newlib/libc/sys/linux
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
..
argp Move duplicated documentation rules to Makefile.shared 2015-11-02 18:02:39 -05:00
bits 2008-11-19 Jeff Johnston <jjohnstn@redhat.com> 2008-11-19 20:56:22 +00:00
cmath Move duplicated documentation rules to Makefile.shared 2015-11-02 18:02:39 -05:00
dl Move duplicated documentation rules to Makefile.shared 2015-11-02 18:02:39 -05:00
iconv Move duplicated documentation rules to Makefile.shared 2015-11-02 18:02:39 -05:00
include headers: properly decorate attributes 2014-08-01 15:44:51 +00:00
intl Move duplicated documentation rules to Makefile.shared 2015-11-02 18:02:39 -05:00
linuxthreads Bump up newlib version to 2.4.0 due to feature test refactoring 2016-03-29 17:33:42 -04:00
machine Bump up newlib version to 2.4.0 due to feature test refactoring 2016-03-29 17:33:42 -04:00
net Change if_nameindex() to use unsigned int i variable. 2016-02-04 13:30:14 -05:00
sys Eliminate use of Newlib-specific <machine/types.h> 2016-04-13 13:30:27 +02:00
Makefile.am * libc/include/signal.h (psignal): Declare. 2011-05-04 11:26:22 +00:00
Makefile.in 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
aclocal.m4 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
aio.c 2006-02-16 Jeff Johnston <jjohnstn@redhat.com> 2006-02-16 21:25:45 +00:00
aio64.c 2002-07-29 Jeff Johnston <jjohnstn@redhat.com> 2002-07-29 17:40:10 +00:00
bp-checks.h 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
brk.c 2002-08-17 Jeff Johnston <jjohnstn@redhat.com> 2002-08-17 05:19:18 +00:00
calloc.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
callocr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 21:13:32 +00:00
cfreer.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
cfspeed.c 2002-05-28 Jeff Johnston <jjohnstn@redhat.com> 2002-05-28 22:26:36 +00:00
clock_getres.c 2002-06-27 Jeff Johnston <jjohnstn@redhat.com> 2002-06-27 20:09:26 +00:00
clock_gettime.c 2002-06-27 Jeff Johnston <jjohnstn@redhat.com> 2002-06-27 20:09:26 +00:00
clock_settime.c 2002-06-27 Jeff Johnston <jjohnstn@redhat.com> 2002-06-27 20:09:26 +00:00
config.h 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 17:59:48 +00:00
configure Bump up newlib version to 2.4.0 due to feature test refactoring 2016-03-29 17:33:42 -04:00
configure.in 2010-02-24 Charles Wilson <...> 2010-02-24 21:00:08 +00:00
confstr.c 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 18:41:15 +00:00
confstr.h 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 18:41:15 +00:00
crt1.c 2002-04-04 Jeff Johnston <jjohnstn@redhat.com> 2002-04-04 22:41:11 +00:00
ctermid.c 2002-07-23 Jeff Johnston <jjohnstn@redhat.com> 2002-07-23 19:40:45 +00:00
fclean.c 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 20:09:20 +00:00
flockfile.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
fpathconf.c * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
free.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
freer.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
fstab.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
fstatvfs.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
fstatvfs64.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
ftok.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
ftw.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
ftw64.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
funlockfile.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
getdate.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
getdate_err.c 2002-06-21 Jeff Johnston <jjohnstn@redhat.com> 2002-06-21 18:29:23 +00:00
gethostid.c 2003-05-28 Jeff Johnston <jjohnstn@redhat.com> 2003-05-28 22:04:40 +00:00
gethostname.c 2002-06-24 Jeff Johnston <jjohnstn@redhat.com> 2002-06-24 21:46:06 +00:00
getlogin.c 2003-11-07 Jeff Johnston <jjohnstn@redhat.com> 2003-11-07 23:47:05 +00:00
getopt.c * libc/sys/linux/argp: New directory. 2002-08-29 23:53:06 +00:00
getopt1.c * libc/sys/linux/argp: New directory. 2002-08-29 23:53:06 +00:00
getpwent.c 2005-05-12 Jeff Johnston <jjohnstn@redhat.com> 2005-05-12 22:06:26 +00:00
getreent.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
getrlimit64.c 2002-07-19 Jeff Johnston <jjohnstn@redhat.com> 2002-07-19 23:21:43 +00:00
getwd.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
hp-timing.h 2002-06-27 Jeff Johnston <jjohnstn@redhat.com> 2002-06-27 20:09:26 +00:00
ids.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
inode.c 2008-11-28 Jeff Johnston <jjohnstn@redhat.com> 2008-11-28 17:15:47 +00:00
internal_statvfs.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
io.c Fix reference to __mknod syscall to pass proper third argument. 2006-03-29 21:50:52 +00:00
io64.c 2008-11-28 Jeff Johnston <jjohnstn@redhat.com> 2008-11-28 17:15:47 +00:00
ipc.c 2002-06-19 Jeff Johnston <jjohnstn@redhat.com> 2002-06-19 22:17:33 +00:00
isatty.c 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:33:37 +00:00
kernel_sigaction.h 2002-05-30 Jeff Johnston <jjohnstn@redhat.com> 2002-05-30 20:51:03 +00:00
libc-internal.h 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 17:59:48 +00:00
libc-symbols.h headers: properly decorate attributes 2014-08-01 15:44:51 +00:00
libc-tsd.h 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
libintl.h 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
linux.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
linux_fsinfo.h 2002-07-19 Jeff Johnston <jjohnstn@redhat.com> 2002-07-20 01:03:08 +00:00
malign.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
malignr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mallinfor.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
malloc.c 2003-06-20 Jeff Johnston <jjohnstn@redhat.com> 2003-06-20 23:57:48 +00:00
mallocr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
malloptr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mallstatsr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mcheck.c 2003-06-20 Jeff Johnston <jjohnstn@redhat.com> 2003-06-20 23:57:48 +00:00
mhooks.h 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mmap.c 2006-07-31 Jeff Johnston <jjohnstn@redhat.com> 2006-07-31 22:21:24 +00:00
mntent.c 2003-06-20 Jeff Johnston <jjohnstn@redhat.com> 2003-06-20 23:57:48 +00:00
mntent_r.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
mq_close.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mq_getattr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mq_notify.c 2002-06-19 Jeff Johnston <jjohnstn@redhat.com> 2002-06-19 22:17:33 +00:00
mq_open.c 2003-06-27 Jose Goncalves <jose.goncalves@inov.pt> 2003-06-27 21:25:19 +00:00
mq_receive.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mq_send.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mq_setattr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mq_unlink.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mqlocal.h 2002-06-19 Jeff Johnston <jjohnstn@redhat.com> 2002-06-19 22:17:33 +00:00
msize.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
msizer.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mstats.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mtrim.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
mtrimr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
ntp_gettime.c 2002-06-21 Jeff Johnston <jjohnstn@redhat.com> 2002-06-21 18:29:23 +00:00
pathconf.c * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
pread.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
pread64.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
process.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
prof-freq.c * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
profile.c * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
pvallocr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
pwrite.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
pwrite64.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
raise.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
readdir64.c 2002-07-23 Jeff Johnston <jjohnstn@redhat.com> 2002-07-23 19:40:45 +00:00
realloc.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
reallocr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
realpath.c 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com> 2013-11-19 17:32:24 +00:00
rename.c 2002-05-24 Jeff Johnston <jjohnstn@redhat.com> 2002-05-24 23:44:39 +00:00
resource.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
scandir64.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
sched.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
select.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
seteuid.c * libc/sys/linux/sys/cdefs.h: Add __weak_reference macros. 2002-05-24 18:50:29 +00:00
sethostid.c 2003-05-28 Jeff Johnston <jjohnstn@redhat.com> 2003-05-28 22:04:40 +00:00
sethostname.c 2002-06-25 Jeff Johnston <jjohnstn@redhat.com> 2002-06-25 18:05:31 +00:00
setrlimit64.c 2002-07-19 Jeff Johnston <jjohnstn@redhat.com> 2002-07-19 23:21:43 +00:00
shared.ld 2014-12-18 Jeff Johnston <jjohnstn@redhat.com> 2014-12-18 20:30:11 +00:00
shlib-compat.h 2008-05-22 Jeff Johnston <jjohnstn@redhat.com> 2008-05-22 21:30:28 +00:00
shm_open.c 2002-05-22 Jeff Johnston <jjohnstn@redhat.com> 2002-05-22 20:26:28 +00:00
shm_unlink.c 2002-05-22 Jeff Johnston <jjohnstn@redhat.com> 2002-05-22 20:26:28 +00:00
sig.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
sigaction.c 2002-05-31 Jeff Johnston <jjohnstn@redhat.com> 2002-05-31 20:18:59 +00:00
siglongjmp.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
signal.c 2002-05-31 Jeff Johnston <jjohnstn@redhat.com> 2002-05-31 20:18:59 +00:00
sigqueue.c 2002-05-30 Jeff Johnston <jjohnstn@redhat.com> 2002-05-30 20:51:03 +00:00
sigset.c 2002-05-31 Jeff Johnston <jjohnstn@redhat.com> 2002-05-31 20:18:59 +00:00
sigwait.c 2002-05-30 Jeff Johnston <jjohnstn@redhat.com> 2002-05-30 20:51:03 +00:00
sleep.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
socket.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
sockops.h 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
stack.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
statvfs.c 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-22 01:17:42 +00:00
statvfs64.c 2002-07-24 Jeff Johnston <jjohnstn@redhat.com> 2002-07-24 20:38:32 +00:00
strsignal.c 2002-06-05 Jeff Johnston <jjohnstn@redhat.com> 2002-06-05 20:58:59 +00:00
strverscmp.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
sysconf.c 2002-06-27 Jeff Johnston <jjohnstn@redhat.com> 2002-06-27 20:09:26 +00:00
sysctl.c * libc/sys/linux/sys/cdefs.h: Add __weak_reference macros. 2002-05-24 18:50:29 +00:00
systat.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
system.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
tcdrain.c 2002-05-17 Jeff Johnston <jjohnstn@redhat.com> 2002-05-17 23:39:39 +00:00
tcsendbrk.c 2002-05-28 Jeff Johnston <jjohnstn@redhat.com> 2002-05-28 22:26:36 +00:00
termios.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00
thread-m.h 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
time.c 2002-06-21 Jeff Johnston <jjohnstn@redhat.com> 2002-06-21 18:29:23 +00:00
ttyname_r.c 2002-07-25 Jeff Johnston <jjohnstn@redhat.com> 2002-07-25 17:59:48 +00:00
usleep.c 2002-04-03 Jeff Johnston <jjohnstn@redhat.com> 2002-04-03 22:46:21 +00:00
utimes.c 2002-07-04 Jeff Johnston <jjohnstn@redhat.com> 2002-07-04 22:51:08 +00:00
vallocr.c 2002-07-15 Jeff Johnston <jjohnstn@redhat.com> 2002-07-15 20:16:32 +00:00
versionsort.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
versionsort64.c 2002-07-26 Jeff Johnston <jjohnstn@redhat.com> 2002-07-26 21:44:34 +00:00
wait.c 2002-08-26 Jeff Johnston <jjohnstn@redhat.com> 2002-08-26 18:56:09 +00:00