diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-04-21 10:27:29 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-21 10:27:29 +0200 |
commit | 878e65d35444595d84fb68df0cdf7af531b5acbf (patch) | |
tree | f16624394de542b5abd5b66be0f311d11637bb72 | |
parent | 8cb99e8ba480c3cda1d6d69af0d8a77540d93934 (diff) | |
download | cygnal-878e65d35444595d84fb68df0cdf7af531b5acbf.tar.gz cygnal-878e65d35444595d84fb68df0cdf7af531b5acbf.tar.bz2 cygnal-878e65d35444595d84fb68df0cdf7af531b5acbf.zip |
Simplify guard against defining pthread types on Cygwin
* libc/include/sys/types.h: Fix a comment about Cygwin. Simplify
guarding pthread types against inclusion on Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | newlib/libc/include/sys/types.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index dbff4d774..ee9db7593 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -240,14 +240,14 @@ typedef __int64_t sbintime_t; #include <sys/features.h> -/* Cygwin will probably never have full posix compliance due to little things - * like an inability to set the stackaddress. Cygwin is also using void * - * 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 - * <machine/types.h> +/* + * Cygwin is using a complete distinct implementation of pthread objects and + * pointers rather than structs. This means we can't use the types defined + * here, but rather in <machine/types.h>. */ -#if defined(_POSIX_THREADS) && !defined(__CYGWIN__) +#if !defined(__CYGWIN__) + +#if defined(_POSIX_THREADS) #include <sys/sched.h> @@ -430,11 +430,10 @@ typedef struct { int is_initialized; /* is this structure initialized? */ int init_executed; /* has the initialization routine been run? */ } pthread_once_t; /* dynamic package initialization */ -#endif /* defined(_POSIX_THREADS) && !defined(__CYGWIN__) */ +#endif /* defined(_POSIX_THREADS) */ /* POSIX Barrier Types */ -#if !defined(__CYGWIN__) #if defined(_POSIX_BARRIERS) typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */ typedef struct { @@ -462,6 +461,7 @@ typedef struct { #endif } pthread_rwlockattr_t; #endif /* defined(_POSIX_READER_WRITER_LOCKS) */ + #endif /* __CYGWIN__ */ #include <machine/types.h> |