[libc-commits] [libc] 129c8b8 - add extern "C" to __errno_location's definition if in __cplusplus file
Alex Brachet via libc-commits
libc-commits at lists.llvm.org
Mon Mar 9 00:12:09 PDT 2020
Author: Alex Brachet
Date: 2020-03-09T03:10:59-04:00
New Revision: 129c8b8081f43b79b3ac0442f1706e11b5dd5708
URL: https://github.com/llvm/llvm-project/commit/129c8b8081f43b79b3ac0442f1706e11b5dd5708
DIFF: https://github.com/llvm/llvm-project/commit/129c8b8081f43b79b3ac0442f1706e11b5dd5708.diff
LOG: add extern "C" to __errno_location's definition if in __cplusplus file
Added:
Modified:
libc/config/linux/api.td
Removed:
################################################################################
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index 1c9fa8a36c2e..673521f4eff9 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -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())
}];
More information about the libc-commits
mailing list