[libc] temporaliy disable __USE_EXTERN_INLINES and set __USE_FORITFY_LEVEL to 1 before including in overlay mode (#113012)
This commit is contained in:
committed by
GitHub
parent
0a6def62c2
commit
cf4442e6b1
@@ -27,6 +27,17 @@
|
||||
#undef _FORTIFY_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
#define LIBC_OLD_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,15 @@
|
||||
#undef LIBC_SET_NO_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#undef __USE_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
|
||||
#undef LIBC_OLD_USE_EXTERN_INLINES
|
||||
#endif
|
||||
|
||||
#endif // LLVM_LIBC_HDR_STDIO_OVERLAY_H
|
||||
|
||||
@@ -32,6 +32,17 @@
|
||||
#define LIBC_SET_NO_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
#define LIBC_OLD_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,15 @@
|
||||
#undef LIBC_SET_NO_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#undef __USE_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
|
||||
#undef LIBC_OLD_USE_EXTERN_INLINES
|
||||
#endif
|
||||
|
||||
#endif // LLVM_LIBC_HDR_WCHAR_OVERLAY_H
|
||||
|
||||
Reference in New Issue
Block a user