]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/bacula.h
kes Add dev->close() in dir_ask_sysop_to_mount_volume() in
[bacula/bacula] / bacula / src / bacula.h
index 60a219fee66d2f82743cb9e6c4e6ccce7cfee85b..09291ab3cae38f45fd1b218f9682d77d0111815e 100644 (file)
 #else
 #include "winconfig.h"
 #endif
-#include "winhost.h"
 #else
 #include "config.h"
-#include "host.h"
 #endif
 
 
 #if HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
-
+#if defined(_MSC_VER)
+#include <io.h>
+#include <direct.h>
+#include <process.h>
+#endif
 #include <errno.h>
 #include <fcntl.h>
 
 #define O_NOATIME 0
 #endif
 
+#if defined(_MSC_VER)
+extern "C" {
+#include "getopt.h"
+}
+#endif
+
 #ifdef xxxxx
 #ifdef HAVE_GETOPT_LONG
 #include <getopt.h>
 #endif
 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
 #include <winsock2.h>
-#else
-//#include <sys/stat.h>
-#endif
+#endif 
+#if !defined(HAVE_WIN32) & !defined(HAVE_MINGW)
+#include <sys/stat.h>
+#endif 
 #include <sys/time.h>
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #include "baconfig.h"
 #include "lib/lib.h"
 
+/*
+ * For wx-console compiles, we undo some Bacula defines.
+ *  This prevents conflicts between wx-Widgets and Bacula.
+ *  In wx-console files that malloc or free() Bacula structures
+ *  config/resources and interface to the Bacula libraries,
+ *  you must use bmalloc() and bfree().
+ */
 #ifdef HAVE_WXCONSOLE
 #undef New
 #undef _
+#undef free
+#undef malloc
 #endif
 
 #if defined(HAVE_WIN32)
 #include "win32/winapi.h"
+#include "winhost.h"
+#else
+#include "host.h"
 #endif
 
 #ifndef HAVE_ZLIB_H