Changeset 91798 in vbox for trunk/include/VBox
- Timestamp:
- Oct 17, 2021 10:56:45 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r91796 r91798 2221 2221 SUPR0DECL(int) SUPR0PrintfV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0); 2222 2222 2223 /* HACK ALERT! linux/compiler_types.h redefines __inline__ to always_inline which causes the compiler (gcc 9.3 and2224 older at least) to barf on the va_list below when SUPR0Printf is used, preventing compiliation of2225 SUPDrv.c among other things. We have a hack for this in iprt/types.h for pre 4.1 compilers where2226 it would barf even if not used, causing troubles on 2-3 functions in iprt/string.h. Applying that2227 fix for all gcc versions there would be preferable, however, since a while we include iprt/types.h2228 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 12233 # undef __inline__2234 #endif2235 2236 2223 /** 2237 2224 * Writes to the debugger and/or kernel log. … … 2244 2231 * @param ... Arguments referenced by the format string. 2245 2232 */ 2246 DECLINLINE(int) SUPR0Printf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2); /* RT_IPRT_FORMAT_ATTR only allowed on proto */ 2247 DECLINLINE(int) SUPR0Printf(const char *pszFormat, ...) 2233 #if defined(__GNUC__) 2234 /* Define it as static for GCC as it cannot inline functions using va_start() anyway, 2235 and linux redefines __inline__ to always inlining forcing gcc to issue an error. */ 2236 static int __attribute__((__unused__)) 2237 #else 2238 DECLINLINE(int) 2239 #endif 2240 RT_IPRT_FORMAT_ATTR(1, 2) SUPR0Printf(const char *pszFormat, ...) 2248 2241 { 2249 2242 va_list va;
Note:
See TracChangeset
for help on using the changeset viewer.