tools/*: remove bcc and as86 as they are no longer required to compile the system...
[virtualbox.git] / src / recompiler / Sun / crt / stdio.h
blob5b4d22f0c2178cdee036aac31fd9d06b8699e73f
1 /* $Id$ */
2 /** @file
3 * Our minimal stdio
4 */
6 /*
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
21 #ifndef LOG_GROUP
22 # define UNDO_LOG_GROUP
23 #endif
25 #include <VBox/log.h>
27 #ifdef UNDO_LOG_GROUP
28 # undef UNDO_LOG_GROUP
29 # undef LOG_GROUP
30 #endif
32 #ifndef LOG_USE_C99
33 # error "LOG_USE_C99 isn't defined."
34 #endif
36 RT_C_DECLS_BEGIN
38 typedef struct FILE FILE;
40 #if defined(RT_OS_SOLARIS)
41 /** @todo Check solaris' floatingpoint.h as to why we do this */
42 # define _FILEDEFED
43 #endif
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))
53 va_list va;
54 va_start(va, pszFormat);
55 RTLogLoggerExV(NULL, 0, LOG_GROUP_REM_PRINTF, pszFormat, va);
56 va_end(va);
58 #endif
59 return 0;
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."
68 #endif
70 RT_C_DECLS_END
72 #endif