Bug 24156 – ImportC: Apple uses __signed as a keyword
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2023-09-24T11:19:51Z
Last change time
2023-09-30T09:07:39Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Chance Snow
Comments
Comment #0 by git — 2023-09-24T11:19:51Z
stdint.h headers use __signed as a keyword with the mac OS SDK.
test.c
-----
#include <stdint.h>
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h
-----
/*
* Copyright (c) 2012 Apple Inc. All rights reserved.
* [...]
*/
#ifndef _INT8_T
#define _INT8_T
typedef __signed char int8_t;
#endif /* _INT8_T */
I'm working around this issue like this for now:
workaround.c
-----
#define __signed
#include <stdint.h>
Comment #1 by dlang-bot — 2023-09-30T06:12:31Z
@WalterBright created dlang/dmd pull request #15640 "fix Issue 24156 - ImportC: Apple uses __signed as a keyword" fixing this issue:
- fix Issue 24156 - ImportC: Apple uses __signed as a keyword
https://github.com/dlang/dmd/pull/15640
Comment #2 by dlang-bot — 2023-09-30T09:07:39Z
dlang/dmd pull request #15640 "fix Issue 24156 - ImportC: Apple uses __signed as a keyword" was merged into master:
- de114f8f14d2334a15e354adb7f84bcf5667cba9 by Walter Bright:
fix Issue 24156 - ImportC: Apple uses __signed as a keyword
https://github.com/dlang/dmd/pull/15640