diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-21 08:21:44 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-21 10:08:19 +0200 |
commit | 9bb91b6c6b2c648fb656a7b41a72037a4659f708 (patch) | |
tree | bbd9c7aed584e5fa0eff28938c9623711dddf129 /newlib | |
parent | 5c9403eaf40951f8a4f55ed65f661b485ff44be7 (diff) | |
download | cygnal-9bb91b6c6b2c648fb656a7b41a72037a4659f708.tar.gz cygnal-9bb91b6c6b2c648fb656a7b41a72037a4659f708.tar.bz2 cygnal-9bb91b6c6b2c648fb656a7b41a72037a4659f708.zip |
Resurrect <machine/types.h> for <sys/types.h>
Resurrect <machine/_user_types.h> for use in <sys/types.h>. Newlib
targets may provide an own version of <machine/types.h> in their machine
directory to add custom user types for <sys/types.h>. Check the
_SYS_TYPES_H header guard to prevent a direct include of
<machine/types.h>, since the <machine/types.h> file is a Newlib
speciality.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/include/machine/types.h | 14 | ||||
-rw-r--r-- | newlib/libc/include/sys/signal.h | 5 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 10 |
3 files changed, 9 insertions, 20 deletions
diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h index 669242bf4..a5a64e675 100644 --- a/newlib/libc/include/machine/types.h +++ b/newlib/libc/include/machine/types.h @@ -1,11 +1,7 @@ -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ - /* - * This file is provided for backward compatibility. It is no longer used in - * Newlib. Do not add new things to it. + * Newlib targets may provide an own version of this file in their machine + * directory to add custom user types for <sys/types.h>. */ - -#include <sys/_types.h> - -#endif /* _MACHTYPES_H_ */ +#ifndef _SYS_TYPES_H +#error "must be included via <sys/types.h>" +#endif /* !_SYS_TYPES_H */ diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h index d6d173cc0..8d1b53fce 100644 --- a/newlib/libc/include/sys/signal.h +++ b/newlib/libc/include/sys/signal.h @@ -199,11 +199,6 @@ int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict)); #endif #if defined(_POSIX_THREADS) -#ifdef __CYGWIN__ -# ifndef _CYGWIN_TYPES_H -# error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib. -# endif -#endif int _EXFUN(pthread_kill, (pthread_t thread, int sig)); #endif diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 067d6506a..dbff4d774 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -245,7 +245,7 @@ typedef __int64_t sbintime_t; * pointers rather than structs to ensure maximum binary compatability with * previous releases. * This means that we don't use the types defined here, but rather in - * <cygwin/types.h> + * <machine/types.h> */ #if defined(_POSIX_THREADS) && !defined(__CYGWIN__) @@ -430,11 +430,7 @@ typedef struct { int is_initialized; /* is this structure initialized? */ int init_executed; /* has the initialization routine been run? */ } pthread_once_t; /* dynamic package initialization */ -#else -#if defined (__CYGWIN__) -#include <cygwin/types.h> -#endif -#endif /* defined(_POSIX_THREADS) */ +#endif /* defined(_POSIX_THREADS) && !defined(__CYGWIN__) */ /* POSIX Barrier Types */ @@ -468,6 +464,8 @@ typedef struct { #endif /* defined(_POSIX_READER_WRITER_LOCKS) */ #endif /* __CYGWIN__ */ +#include <machine/types.h> + #endif /* !__need_inttypes */ #undef __need_inttypes |