Message ID | 2CAB854A-7FA6-42D1-A5DA-F190B6594571@googlemail.com |
---|---|
State | New |
Headers | show |
Series | [Darwin] Fix PR bootstrap/89864 | expand |
> On Apr 15, 2019, at 11:59 PM, Iain Sandoe <idsandoe@googlemail.com> wrote: > OK for trunk (after wider testing)? Didn't we make you a Darwin maintainer yet? Ok. > branches? Ok.
Hi Mike, > On 16 Apr 2019, at 21:05, Mike Stump <mikestump@comcast.net> wrote: > >> On Apr 15, 2019, at 11:59 PM, Iain Sandoe <idsandoe@googlemail.com> wrote: >> OK for trunk (after wider testing)? > > Didn't we make you a Darwin maintainer yet? /me is willing .. (given the usual comment about finite time available, of course) > Ok. > >> branches? > > Ok. thanks, Iain
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 8fd9f7e..d8ce89a 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1622,6 +1622,25 @@ fix = { "#define UINTMAX_C(v) (v ## ULL)"; }; +/* The SDK included with XCode 10.2 has the file <sys/ucred.h> that uses the + C11 _Atomic keyword (exposing it to C++ code). The work-around here follows + the header in declaring the entity volatile when _Atomic is not available. +*/ +fix = { + hackname = darwin_ucred__Atomic; + mach = "*-*-darwin*"; + files = sys/ucred.h; + select = "_Atomic"; + c_fix = wrap; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# define _Atomic volatile\n" + "#endif\n"; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# undef _Atomic\n" + "#endif\n"; + test_text = "_Atomic"; +}; + /* * Fix <c_asm.h> on Digital UNIX V4.0: * It contains a prototype for a DEC C internal asm() function,