Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions libc/hdr/stdio_overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
#undef _FORTIFY_SOURCE
#endif

#ifdef __USE_EXTERN_INLINES
#define LIBC_OLD_EXTERN_INLINES __USE_EXTERN_INLINES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#define LIBC_OLD_EXTERN_INLINES is enough, system headers do not set any value for __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
Expand All @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#define __USE_EXTERN_INLINES is enough

#undef LIBC_OLD_USE_EXTERN_INLINES
#endif

#endif // LLVM_LIBC_HDR_STDIO_OVERLAY_H
21 changes: 21 additions & 0 deletions libc/hdr/wchar_overlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Loading