Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 1 | From 39e2f61d262f9f6c7a91068998dea80791ef665e Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 3 Feb 2017 12:56:00 -0800 |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 4 | Subject: [PATCH 33/36] sync gcc stddef.h with musl |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | |
| 6 | musl defines ptrdiff_t size_t and wchar_t |
| 7 | so dont define them here if musl is definining them |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | gcc/ginclude/stddef.h | 9 +++++++++ |
| 14 | 1 file changed, 9 insertions(+) |
| 15 | |
| 16 | diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h |
| 17 | index da692e1c01a..9a00c261adb 100644 |
| 18 | --- a/gcc/ginclude/stddef.h |
| 19 | +++ b/gcc/ginclude/stddef.h |
| 20 | @@ -128,6 +128,7 @@ _TYPE_wchar_t; |
| 21 | #ifndef ___int_ptrdiff_t_h |
| 22 | #ifndef _GCC_PTRDIFF_T |
| 23 | #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ |
| 24 | +#ifndef __DEFINED_ptrdiff_t /* musl */ |
| 25 | #define _PTRDIFF_T |
| 26 | #define _T_PTRDIFF_ |
| 27 | #define _T_PTRDIFF |
| 28 | @@ -137,10 +138,12 @@ _TYPE_wchar_t; |
| 29 | #define ___int_ptrdiff_t_h |
| 30 | #define _GCC_PTRDIFF_T |
| 31 | #define _PTRDIFF_T_DECLARED |
| 32 | +#define __DEFINED_ptrdiff_t /* musl */ |
| 33 | #ifndef __PTRDIFF_TYPE__ |
| 34 | #define __PTRDIFF_TYPE__ long int |
| 35 | #endif |
| 36 | typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 37 | +#endif /* __DEFINED_ptrdiff_t */ |
| 38 | #endif /* _PTRDIFF_T_DECLARED */ |
| 39 | #endif /* _GCC_PTRDIFF_T */ |
| 40 | #endif /* ___int_ptrdiff_t_h */ |
| 41 | @@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 42 | #ifndef _GCC_SIZE_T |
| 43 | #ifndef _SIZET_ |
| 44 | #ifndef __size_t |
| 45 | +#ifndef __DEFINED_size_t /* musl */ |
| 46 | #define __size_t__ /* BeOS */ |
| 47 | #define __SIZE_T__ /* Cray Unicos/Mk */ |
| 48 | #define _SIZE_T |
| 49 | @@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 50 | #define ___int_size_t_h |
| 51 | #define _GCC_SIZE_T |
| 52 | #define _SIZET_ |
| 53 | +#define __DEFINED_size_t /* musl */ |
| 54 | #if defined (__FreeBSD__) \ |
| 55 | || defined(__DragonFly__) \ |
| 56 | || defined(__FreeBSD_kernel__) \ |
| 57 | @@ -228,6 +233,7 @@ typedef long ssize_t; |
| 58 | #endif /* _SIZE_T */ |
| 59 | #endif /* __SIZE_T__ */ |
| 60 | #endif /* __size_t__ */ |
| 61 | +#endif /* __DEFINED_size_t */ |
| 62 | #undef __need_size_t |
| 63 | #endif /* _STDDEF_H or __need_size_t. */ |
| 64 | |
| 65 | @@ -257,6 +263,7 @@ typedef long ssize_t; |
| 66 | #ifndef ___int_wchar_t_h |
| 67 | #ifndef __INT_WCHAR_T_H |
| 68 | #ifndef _GCC_WCHAR_T |
| 69 | +#ifndef __DEFINED_wchar_t /* musl */ |
| 70 | #define __wchar_t__ /* BeOS */ |
| 71 | #define __WCHAR_T__ /* Cray Unicos/Mk */ |
| 72 | #define _WCHAR_T |
| 73 | @@ -272,6 +279,7 @@ typedef long ssize_t; |
| 74 | #define __INT_WCHAR_T_H |
| 75 | #define _GCC_WCHAR_T |
| 76 | #define _WCHAR_T_DECLARED |
| 77 | +#define __DEFINED_wchar_t /* musl */ |
| 78 | |
| 79 | /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ |
| 80 | instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other |
| 81 | @@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t; |
| 82 | #endif |
| 83 | #endif /* __WCHAR_T__ */ |
| 84 | #endif /* __wchar_t__ */ |
| 85 | +#endif /* __DEFINED_wchar_t musl */ |
| 86 | #undef __need_wchar_t |
| 87 | #endif /* _STDDEF_H or __need_wchar_t. */ |
| 88 | |
| 89 | -- |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 90 | 2.22.1 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 91 | |