diff options
author | Szabolcs Nagy <nsz@port70.net> | 2014-05-30 17:57:16 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-05-30 13:06:51 -0400 |
commit | 5f4c4966934b913e9f8a54d60312f874a9d14088 (patch) | |
tree | 691dbfb76e1d39f593f1b9dcf2ff1a6df11534fa /include | |
parent | bff6095d915f3e41206e47ea2a570ecb937ef926 (diff) | |
download | musl-5f4c4966934b913e9f8a54d60312f874a9d14088.tar.gz musl-5f4c4966934b913e9f8a54d60312f874a9d14088.tar.bz2 musl-5f4c4966934b913e9f8a54d60312f874a9d14088.tar.xz musl-5f4c4966934b913e9f8a54d60312f874a9d14088.zip |
fix POSIX namespace pollution in sys/types.h
int8_t, u_int8_t, etc types are moved under _BSD_SOURCE
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/types.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/sys/types.h b/include/sys/types.h index 27170f64..f00db03e 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -20,11 +20,6 @@ extern "C" { #define __NEED_timer_t #define __NEED_clockid_t -#define __NEED_int8_t -#define __NEED_int16_t -#define __NEED_int32_t -#define __NEED_int64_t - #define __NEED_blkcnt_t #define __NEED_fsblkcnt_t #define __NEED_fsfilcnt_t @@ -49,19 +44,22 @@ extern "C" { #define __NEED_pthread_key_t #define __NEED_pthread_once_t #define __NEED_useconds_t -#define __NEED_u_int64_t #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define __NEED_int8_t +#define __NEED_int16_t +#define __NEED_int32_t +#define __NEED_int64_t +#define __NEED_u_int64_t #define __NEED_register_t #endif #include <bits/alltypes.h> +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) typedef unsigned char u_int8_t; typedef unsigned short u_int16_t; typedef unsigned u_int32_t; - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) typedef char *caddr_t; typedef unsigned char u_char; typedef unsigned short u_short, ushort; @@ -87,5 +85,3 @@ typedef unsigned long long u_quad_t; } #endif #endif - - |