diff options
Diffstat (limited to 'src/VBox/GuestHost/OpenGL/include/cr_error.h')
| -rw-r--r-- | src/VBox/GuestHost/OpenGL/include/cr_error.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/VBox/GuestHost/OpenGL/include/cr_error.h b/src/VBox/GuestHost/OpenGL/include/cr_error.h index a73a47bc..ca472d28 100644 --- a/src/VBox/GuestHost/OpenGL/include/cr_error.h +++ b/src/VBox/GuestHost/OpenGL/include/cr_error.h @@ -24,10 +24,29 @@ extern "C" { #define PRINTF #endif +#ifndef WARN +# ifndef IN_RING0 +# define LOG(_m) do { crDebug _m ; } while (0) +# define LOGREL(_m) do { crDebug _m ; } while (0) +# define WARN(_m) do { crWarning _m ; AssertMsgFailed(_m); } while (0) +# else +# define LOG(_m) do { } while (0) +# define LOGREL(_m) do { } while (0) +# define WARN(_m) do { AssertMsgFailed(_m); } while (0) +# endif +#endif + DECLEXPORT(void) crEnableWarnings(int onOff); DECLEXPORT(void) crDebug(const char *format, ... ) PRINTF; +#if defined(DEBUG_misha) && defined(RT_OS_WINDOWS) +typedef void FNCRDEBUG(const char *format, ... ) PRINTF; +typedef FNCRDEBUG *PFNCRDEBUG; +DECLINLINE(PFNCRDEBUG) crGetDebug() {return crDebug;} +# define crWarning (RT_BREAKPOINT(), crDebug) +#else DECLEXPORT(void) crWarning(const char *format, ... ) PRINTF; +#endif DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF; DECLEXPORT(void) crError(const char *format, ... ) NORETURN_PRINTF; |
