- Timestamp:
- Oct 17, 2021 10:29:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r91795 r91796 2221 2221 SUPR0DECL(int) SUPR0PrintfV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0); 2222 2222 2223 /* Suppress -Winline warnings as (older) gcc refuses to inline functions using va_start: */ 2224 #if RT_GNUC_PREREQ(4, 2) 2225 # if RT_GNUC_PREREQ(4, 6) 2226 # pragma GCC diagnostic push 2227 # endif 2228 # pragma GCC diagnostic ignored "-Winline" 2223 /* HACK ALERT! linux/compiler_types.h redefines __inline__ to always_inline which causes the compiler (gcc 9.3 and 2224 older at least) to barf on the va_list below when SUPR0Printf is used, preventing compiliation of 2225 SUPDrv.c among other things. We have a hack for this in iprt/types.h for pre 4.1 compilers where 2226 it would barf even if not used, causing troubles on 2-3 functions in iprt/string.h. Applying that 2227 fix for all gcc versions there would be preferable, however, since a while we include iprt/types.h 2228 at the start of the-linux-kernel.h, making that kind of suspect as it may cause breakage... 2229 So, chickening out and just working around it here for now. */ 2230 #if defined(__inline__) && defined(RT_OS_LINUX) && defined(__KERNEL__) && defined(__LINUX_COMPILER_TYPES_H) 2231 /** @todo In the long run, sort this out in a more proper way! */ 2232 # define SUPR0PRINTF_UNDO_INLINE_HACK 1 2233 # undef __inline__ 2229 2234 #endif 2235 2230 2236 /** 2231 2237 * Writes to the debugger and/or kernel log. … … 2247 2253 return 0; 2248 2254 } 2249 #if RT_GNUC_PREREQ(4, 6) 2250 # pragma GCC diagnostic pop 2255 2256 /* HACK ALERT! See above. */ 2257 #ifdef SUPR0PRINTF_UNDO_INLINE_HACK 2258 # define __inline__ inline 2251 2259 #endif 2252 2260
Note:
See TracChangeset
for help on using the changeset viewer.