7 * Copyright (C) 2006-2007 Oracle Corporation
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 #ifndef ___Sun_stdio_h
19 #define ___Sun_stdio_h
22 # define UNDO_LOG_GROUP
28 # undef UNDO_LOG_GROUP
33 # error "LOG_USE_C99 isn't defined."
38 typedef struct FILE FILE;
40 #if defined(RT_OS_SOLARIS)
41 /** @todo Check solaris' floatingpoint.h as to why we do this */
45 DECLINLINE(int) fprintf(FILE *ignored
, const char *pszFormat
, ...)
47 /** @todo We don't support wrapping calls taking a va_list yet. It's not worth it yet,
48 * since there are only a couple of cases where this fprintf implementation is used.
49 * (The macro below will deal with the majority of the fprintf calls.) */
50 #if 0 /*def LOG_ENABLED*/
51 if (LogIsItEnabled(NULL
, 0, LOG_GROUP_REM_PRINTF
))
54 va_start(va
, pszFormat
);
55 RTLogLoggerExV(NULL
, 0, LOG_GROUP_REM_PRINTF
, pszFormat
, va
);
62 #define fflush(file) RTLogFlush(NULL)
63 #define printf(...) LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
64 #define fprintf(logfile, ...) LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
66 #ifdef DEBUG_TMP_LOGGING
67 # error "DEBUG_TMP_LOGGING doesn't work with the Sun/crt/stdio.h wrapper."