mirror of git://git.musl-libc.org/musl
fix POSIX namespace pollution in sys/types.h
int8_t, u_int8_t, etc types are moved under _BSD_SOURCE
This commit is contained in:
parent
bff6095d91
commit
5f4c496693
|
@ -20,11 +20,6 @@ extern "C" {
|
||||||
#define __NEED_timer_t
|
#define __NEED_timer_t
|
||||||
#define __NEED_clockid_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_blkcnt_t
|
||||||
#define __NEED_fsblkcnt_t
|
#define __NEED_fsblkcnt_t
|
||||||
#define __NEED_fsfilcnt_t
|
#define __NEED_fsfilcnt_t
|
||||||
|
@ -49,19 +44,22 @@ extern "C" {
|
||||||
#define __NEED_pthread_key_t
|
#define __NEED_pthread_key_t
|
||||||
#define __NEED_pthread_once_t
|
#define __NEED_pthread_once_t
|
||||||
#define __NEED_useconds_t
|
#define __NEED_useconds_t
|
||||||
#define __NEED_u_int64_t
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
#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
|
#define __NEED_register_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
#include <bits/alltypes.h>
|
||||||
|
|
||||||
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
typedef unsigned char u_int8_t;
|
typedef unsigned char u_int8_t;
|
||||||
typedef unsigned short u_int16_t;
|
typedef unsigned short u_int16_t;
|
||||||
typedef unsigned u_int32_t;
|
typedef unsigned u_int32_t;
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
typedef char *caddr_t;
|
typedef char *caddr_t;
|
||||||
typedef unsigned char u_char;
|
typedef unsigned char u_char;
|
||||||
typedef unsigned short u_short, ushort;
|
typedef unsigned short u_short, ushort;
|
||||||
|
@ -87,5 +85,3 @@ typedef unsigned long long u_quad_t;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue