mirror of
https://github.com/reactos/reactos.git
synced 2025-03-01 03:45:16 +00:00
[UCRT] Add GCC compatible definition of _CRT_STDIO_INLINE
In C99 mode GCC emits global symbols for inline functions, as soon as the compilation unit contains a declaration that marks the function as "extern". A number of functions like printf are implicitly declared as extern by GCC, which seemingly cannot be disabled. This would lead to the inline function being emitted as a global symbol in every compilation unit. Using static inline prevents duplicate symbol errors.
This commit is contained in:
parent
4ca68ffb1c
commit
a438d7c3b8
1 changed files with 4 additions and 0 deletions
|
@ -23,8 +23,12 @@ _CRT_BEGIN_C_HEADER
|
||||||
#undef _CRT_STDIO_INLINE
|
#undef _CRT_STDIO_INLINE
|
||||||
#define _CRT_STDIO_INLINE
|
#define _CRT_STDIO_INLINE
|
||||||
#elif !defined _CRT_STDIO_INLINE
|
#elif !defined _CRT_STDIO_INLINE
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define _CRT_STDIO_INLINE static __inline
|
||||||
|
#else
|
||||||
#define _CRT_STDIO_INLINE __inline
|
#define _CRT_STDIO_INLINE __inline
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined RC_INVOKED // RC has no target architecture
|
#if !defined RC_INVOKED // RC has no target architecture
|
||||||
#if defined _M_IX86
|
#if defined _M_IX86
|
||||||
|
|
Loading…
Reference in a new issue