]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/baconfig.h
kes Add dev->close() in dir_ask_sysop_to_mount_volume() in
[bacula/bacula] / bacula / src / baconfig.h
index 0e1ce6562784c6ee8553e4e0c8d06b8301b22e45..4debd4f4440d86d7c102ae2975a4601279ccbfb0 100644 (file)
 /* Allow printing of NULL pointers */
 #define NPRT(x) (x)?(x):_("*None*")
  
-#ifdef WIN32
+#if defined(HAVE_WIN32)
+void InitWinAPIWrapper();
+
+#define  OSDependentInit()    InitWinAPIWrapper()
+
 #undef ENABLE_NLS
+
+#if defined(BUILDING_DLL)
+#  define DLL_IMP_EXP   _declspec(dllexport)
+#elif defined(USING_DLL)
+#  define DLL_IMP_EXP   _declspec(dllimport)
+#else
+#  define DLL_IMP_EXP
+#endif
+
+#if defined(USING_CATS)
+#  define CATS_IMP_EXP   _declspec(dllimport)
+#else
+#  define CATS_IMP_EXP
+#endif
+
+#else
+
+#define DLL_IMP_EXP
+#define CATS_IMP_EXP
+
+#define  OSDependentInit()
+#define  tape_open            open
+#define  tape_ioctl           ioctl
+#define  tape_read            read
+#define  tape_write           write
+#define  tape_close           ::close
 #endif
 
+
 #ifdef ENABLE_NLS
    #include <libintl.h>
    #include <locale.h>
       #define setlocale(p, d)
    #endif
 #endif /* ENABLE_NLS */
+/* Use the following for strings not to be translated */
+#define NT_(s) (s)   
 
 /* This should go away! ****FIXME***** */
 #define MAXSTRING 500
  * or saved */
 #define FT_DIRBEGIN  18               /* Directory at beginning (not saved) */
 #define FT_INVALIDFS 19               /* File system not allowed for */
+#define FT_INVALIDDT 20               /* Drive type not allowed for */
 
 /* Definitions for upper part of type word (see above). */
 #define AR_DATA_STREAM (1<<16)        /* Data stream id present */
@@ -473,7 +507,7 @@ int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...)
 
 
 /* Use our strdup with smartalloc */
-#ifndef __WXGTK__
+#ifndef HAVE_WXCONSOLE
 #undef strdup
 #define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
 #endif
@@ -560,13 +594,9 @@ extern "C" int getdomainname(char *name, int len);
 extern "C" int mknod ( const char *path, int mode, dev_t device );
 #endif
 
-#ifdef HAVE_CYGWIN
-/* They don't really have it */
-#undef HAVE_GETDOMAINNAME
-#endif
 
 /* Define Winsock functions if we aren't on Windows */
-#if (!defined HAVE_WIN32) || (defined HAVE_CYGWIN)
+#if !defined HAVE_WIN32
 #define WSA_Init() 0 /* 0 = success */
 #define WSACleanup() 0 /* 0 = success */
 #endif
@@ -617,13 +647,4 @@ extern "C" long gethostid(void);
 #endif
 */
 
-/* Fake entry points if regex does not exist */
-#ifndef HAVE_REGEX_H
-#define regcomp(x, y, z) 1
-#define regfree(x)
-#define regerror(rc, preg, prbuf, len) bstrncpy(prbuf, "REGEX not available on this system.", len)
-#define regex_t int
-#define regmatch_t char
-#endif
-
 #endif /* _BACONFIG_H */