]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/baconfig.h
Add some comments, a little cleanup. Show a message if no log message found
[bacula/bacula] / bacula / src / baconfig.h
index d1c533fe0a2f9e20c2bf68f7c9af2b42e7aa2975..dd7c223ebd82e7b4a93be8fdd17c3950853341c9 100644 (file)
@@ -83,7 +83,8 @@ void InitWinAPIWrapper();
 
 #define  OSDependentInit()    InitWinAPIWrapper()
 
-#undef ENABLE_NLS
+#define sbrk(x)  0
+
 
 #if defined(BUILDING_DLL)
 #  define DLL_IMP_EXP   _declspec(dllexport)
@@ -107,9 +108,10 @@ void InitWinAPIWrapper();
 #define  OSDependentInit()
 #define  tape_open            open
 #define  tape_ioctl           ioctl
-#define  tape_read            read
-#define  tape_write           write
+#define  tape_read            ::read
+#define  tape_write           ::write
 #define  tape_close           ::close
+
 #endif
 
 
@@ -123,6 +125,12 @@ void InitWinAPIWrapper();
       #define N_(s) (s)
    #endif /* N_ */
 #else /* !ENABLE_NLS */
+   #undef _
+   #undef N_
+   #undef textdomain
+   #undef bindtextdomain
+   #undef setlocale
+
    #ifndef _
       #define _(s) (s)
    #endif
@@ -139,6 +147,8 @@ void InitWinAPIWrapper();
       #define setlocale(p, d)
    #endif
 #endif /* ENABLE_NLS */
+
+
 /* Use the following for strings not to be translated */
 #define NT_(s) (s)   
 
@@ -277,6 +287,9 @@ void InitWinAPIWrapper();
 /* Size of File Address stored in STREAM_SPARSE_DATA. Do NOT change! */
 #define SPARSE_FADDR_SIZE (sizeof(uint64_t))
 
+/* Size of crypto length stored at head of crypto buffer. Do NOT change! */
+#define CRYPTO_LEN_SIZE ((int)sizeof(uint32_t))
+
 
 /* This is for dumb compilers/libraries like Solaris. Linux GCC
  * does it correctly, so it might be worthwhile
@@ -529,6 +542,14 @@ int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...)
 #ifndef HAVE_WXCONSOLE
 #undef strdup
 #define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
+#else 
+/* Groan, WxWidgets has its own way of doing NLS so cleanup */
+#ifndef ENABLE_NLS
+#undef _
+#undef setlocale
+#undef textdomain
+#undef bindtextdomain
+#endif  
 #endif
 
 /* Use our fgets which handles interrupts */
@@ -616,12 +637,14 @@ extern "C" int mknod ( const char *path, int mode, dev_t device );
 
 #if defined(HAVE_WIN32)
 #define DEFAULT_CONFIGDIR "C:\\Documents and Settings\\All Users\\Application Data\\Bacula"
+#define PathSeparator '\\'
 
 inline bool IsPathSeparator(int ch) { return ch == '/' || ch == '\\'; }
-inline char *first_path_separator(char *path) { return strpbrk(path, ":/\\"); }
-inline const char *first_path_separator(const char *path) { return strpbrk(path, ":/\\"); }
+inline char *first_path_separator(char *path) { return strpbrk(path, "/\\"); }
+inline const char *first_path_separator(const char *path) { return strpbrk(path, "/\\"); }
 
 #else
+#define PathSeparator '/'
 /* Define Winsock functions if we aren't on Windows */
 
 #define WSA_Init() 0 /* 0 = success */
@@ -645,7 +668,6 @@ extern int h_errno;
  */
 extern "C" int getdomainname(char *name, int namelen);
 extern "C" int setdomainname(char *name, int namelen);
-#define uLong unsigned long
 #endif /* HAVE_HPUX_OS */