forked from OSchip/llvm-project
add extern "C" to __errno_location's definition if in __cplusplus file
This commit is contained in:
parent
bdcbdb4848
commit
129c8b8081
|
@ -27,6 +27,9 @@ def NullMacro : MacroDef<"NULL"> {
|
|||
|
||||
def ErrnoMacro : MacroDef<"errno"> {
|
||||
let Defn = [{
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int *__errno_location();
|
||||
#define errno (*__errno_location())
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue