[libc-commits] [libc] [libcdisable use extern inlines and fortify level (PR #113012)

via libc-commits libc-commits at lists.llvm.org
Fri Oct 18 18:09:22 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Job Henandez Lara (Jobhdez)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/113012.diff


2 Files Affected:

- (modified) libc/hdr/stdio_overlay.h (+21) 
- (modified) libc/hdr/wchar_overlay.h (+21) 


``````````diff
diff --git a/libc/hdr/stdio_overlay.h b/libc/hdr/stdio_overlay.h
index cec55abfde7bf6..9b97fce45787ab 100644
--- a/libc/hdr/stdio_overlay.h
+++ b/libc/hdr/stdio_overlay.h
@@ -27,6 +27,17 @@
 #undef _FORTIFY_SOURCE
 #endif
 
+#ifdef __USE_EXTERN_INLINES
+#define LIBC_OLD_EXTERN_INLINES __USE_EXTERN_INLINES
+#undef __USE_EXTERN_INLINES
+#endif
+
+#ifdef __USE_FORTIFY_LEVEL
+#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL
+#undef __USE_FORTIFY_LEVEL
+#define __USE_FORTIFY_LEVEL 0
+#endif
+
 #ifndef __NO_INLINE__
 #define __NO_INLINE__ 1
 #define LIBC_SET_NO_INLINE
@@ -44,4 +55,14 @@
 #undef LIBC_SET_NO_INLINE
 #endif
 
+#ifdef LIBC_OLD_FORTIFY_LEVEL
+#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL
+#undef LIBC_OLD_USE_FORTIFY_LEVEL
+#endif
+
+#ifdef LIBC_OLD_USE_EXTERN_INLINES
+#define __USE_EXTERN_INLINES LIBC_OLD_USE_EXTERN_INLINES
+#undef LIBC_OLD_USE_EXTERN_INLINES
+#endif
+
 #endif // LLVM_LIBC_HDR_STDIO_OVERLAY_H
diff --git a/libc/hdr/wchar_overlay.h b/libc/hdr/wchar_overlay.h
index a1de9d5085d47b..22777fdf0c2805 100644
--- a/libc/hdr/wchar_overlay.h
+++ b/libc/hdr/wchar_overlay.h
@@ -32,6 +32,17 @@
 #define LIBC_SET_NO_INLINE
 #endif
 
+#ifdef __USE_EXTERN_INLINES
+#define LIBC_OLD_EXTERN_INLINES __USE_EXTERN_INLINES
+#undef __USE_EXTERN_INLINES
+#endif
+
+#ifdef __USE_FORTIFY_LEVEL
+#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL
+#undef __USE_FORTIFY_LEVEL
+#define __USE_FORTIFY_LEVEL 0
+#endif
+
 #include <wchar.h>
 
 #ifdef LIBC_OLD_FORTIFY_SOURCE
@@ -44,4 +55,14 @@
 #undef LIBC_SET_NO_INLINE
 #endif
 
+#ifdef LIBC_OLD_FORTIFY_LEVEL
+#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL
+#undef LIBC_OLD_USE_FORTIFY_LEVEL
+#endif
+
+#ifdef LIBC_OLD_USE_EXTERN_INLINES
+#define __USE_EXTERN_INLINES LIBC_OLD_USE_EXTERN_INLINES
+#undef LIBC_OLD_USE_EXTERN_INLINES
+#endif
+
 #endif // LLVM_LIBC_HDR_WCHAR_OVERLAY_H

``````````

</details>


https://github.com/llvm/llvm-project/pull/113012


More information about the libc-commits mailing list