Skip to content

Commit 2ff19e2

Browse files
Iain Sandoeiains
authored andcommitted
includes, Darwin: Handle modular use for macOS SDKs.
gcc/ChangeLog: * ginclude/stddef.h (defined): (__PTRDIFF_T): (__SIZE_T): Signed-off-by: Iain Sandoe <[email protected]>
1 parent 170ca1d commit 2ff19e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gcc/ginclude/stddef.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
8989
#undef _PTRDIFF_T_
9090
#endif
9191

92+
#if defined (__APPLE__)
93+
# if defined(__has_feature) && __has_feature(modules)
94+
# if defined (__need_ptrdiff_t)
95+
# undef __PTRDIFF_T
96+
# endif
97+
# if defined (__need_size_t)
98+
# undef __SIZE_T
99+
# endif
100+
# endif
101+
#endif
102+
92103
/* On VxWorks, <type/vxTypesBase.h> may have defined macros like
93104
_TYPE_size_t which will typedef size_t. fixincludes patched the
94105
vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is

0 commit comments

Comments
 (0)