summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/windbug.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/windbug.c')
-rw-r--r--otherlibs/win32unix/windbug.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/otherlibs/win32unix/windbug.c b/otherlibs/win32unix/windbug.c
index 5bf494e70..e3a2772db 100644
--- a/otherlibs/win32unix/windbug.c
+++ b/otherlibs/win32unix/windbug.c
@@ -13,20 +13,20 @@
/* $Id$ */
-#include <windows.h>
+#include "windbug.h"
-int dbug = 0;
-
-void dbug_init (void)
+int debug_test (void)
{
- dbug = (getenv("OCAMLDBUG") != NULL);
-}
+ static int debug_init = 0;
+ static int debug = 0;
-void dbug_cleanup (void)
-{
-}
+#ifdef DEBUG
+ if (!debug_init)
+ {
+ debug = (getenv("OCAMLDEBUG") != NULL);
+ debug_init = 1;
+ };
+#endif
-int dbug_test (void)
-{
- return dbug;
+ return debug;
}