acadia-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
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
aio64.c
bp-checks.h
brk.c
calloc.c
callocr.c
cfreer.c
cfspeed.c
clock_getres.c
clock_gettime.c
clock_settime.c
config.h
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
confstr.h
crt1.c
ctermid.c
fclean.c
flockfile.c
fpathconf.c
free.c
freer.c
fstab.c
fstatvfs.c
fstatvfs64.c
ftok.c
ftw.c
ftw64.c
funlockfile.c
getdate.c
getdate_err.c
gethostid.c
gethostname.c
getlogin.c
getopt.c
getopt1.c
getpwent.c
getreent.c
getrlimit64.c
getwd.c
hp-timing.h
ids.c
inode.c
internal_statvfs.c
io.c
io64.c
ipc.c
isatty.c
kernel_sigaction.h
libc-internal.h
libc-symbols.h headers: properly decorate attributes 2014-08-01 15:44:51 +00:00
libc-tsd.h
libintl.h
linux.c
linux_fsinfo.h
malign.c
malignr.c
mallinfor.c
malloc.c
mallocr.c
malloptr.c
mallstatsr.c
mcheck.c
mhooks.h
mmap.c
mntent.c
mntent_r.c
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_setattr.c
mq_unlink.c
mqlocal.h
msize.c
msizer.c
mstats.c
mtrim.c
mtrimr.c
ntp_gettime.c
pathconf.c
pread.c
pread64.c
process.c
prof-freq.c
profile.c
pvallocr.c
pwrite.c
pwrite64.c
raise.c
readdir64.c
realloc.c
reallocr.c
realpath.c 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com> 2013-11-19 17:32:24 +00:00
rename.c
resource.c
scandir64.c
sched.c
select.c
seteuid.c
sethostid.c
sethostname.c
setrlimit64.c
shared.ld 2014-12-18 Jeff Johnston <jjohnstn@redhat.com> 2014-12-18 20:30:11 +00:00
shlib-compat.h
shm_open.c
shm_unlink.c
sig.c
sigaction.c
siglongjmp.c
signal.c
sigqueue.c
sigset.c
sigwait.c
sleep.c
socket.c
sockops.h
stack.c
statvfs.c 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-22 01:17:42 +00:00
statvfs64.c
strsignal.c
strverscmp.c
sysconf.c
sysctl.c
systat.c
system.c
tcdrain.c
tcsendbrk.c
termios.c
thread-m.h
time.c
ttyname_r.c
usleep.c
utimes.c
vallocr.c
versionsort.c
versionsort64.c
wait.c