]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/baconfig.h
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / src / baconfig.h
index 7e665ae10a90b78932faf9bd9cd4b3c124306be0..9d8d4270c37b9ca28240287b9f25e0d1bacb5917 100644 (file)
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
-   version 2 as ammended with additional clauses defined in the
+   version 2 as amended with additional clauses defined in the
    file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
 #define TRUE  1
 #define FALSE 0
 
+#ifdef HAVE_TLS
+#define have_tls 1
+#else
+#define have_tls 0
+#endif
+/* For compatibility with 1.39 */
+#define cleanup_crypto cleanup_tls
+#define init_crypto init_tls
+
 #ifndef ETIME
 #define ETIME ETIMEDOUT
 #endif
 #ifdef DEBUG
 #define ASSERT(x) if (!(x)) { \
    char *jcr = NULL; \
-   Emsg1(M_ERROR, 0, "Failed ASSERT: %s\n", #x); \
+   Emsg1(M_ERROR, 0, _("Failed ASSERT: %s\n"), #x); \
    jcr[0] = 0; }
 #else
 #define ASSERT(x)
 #endif
 
 /* Allow printing of NULL pointers */
-#define NPRT(x) (x)?(x):"*None*"
+#define NPRT(x) (x)?(x):_("*None*")
+#ifdef WIN32
+#undef ENABLE_NLS
+#endif
 
 #ifdef ENABLE_NLS
-#include <libintl.h>
-#define _(s) gettext((s))
-#define N_(s) (s)
-#else
-#undef _
-#define _(s) (s)
-#undef N_
-#define N_(s) (s)
-#undef textdomain
-#define textdomain(d)
-/* #define bindtextdomain(p, d) */
-#endif
+   #include <libintl.h>
+   #include <locale.h>
+   #ifndef _
+      #define _(s) gettext((s))
+   #endif /* _ */
+   #ifndef N_
+      #define N_(s) (s)
+   #endif /* N_ */
+#else /* !ENABLE_NLS */
+   #ifndef _
+      #define _(s) (s)
+   #endif
+   #ifndef N_
+      #define N_(s) (s)
+   #endif
+   #ifndef textdomain
+      #define textdomain(d)
+   #endif
+   #ifndef bindtextdomain
+      #define bindtextdomain(p, d)
+   #endif
+   #ifndef setlocale
+      #define setlocale(p, d)
+   #endif
+#endif /* ENABLE_NLS */
 
 /* This should go away! ****FIXME***** */
 #define MAXSTRING 500
@@ -425,7 +451,7 @@ int  Mmsg(POOLMEM *&msgbuf, const char *fmt,...);
 int  Mmsg(POOL_MEM &msgbuf, const char *fmt,...);
 
 
-struct JCR;
+class JCR;
 void d_msg(const char *file, int line, int level, const char *fmt,...);
 void p_msg(const char *file, int line, int level, const char *fmt,...);
 void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
@@ -514,11 +540,15 @@ extern int thr_setconcurrency(int);
 
 #endif
 
-#ifdef HAVE_DARWIN_OS
+#if defined(HAVE_DARWIN_OS) || defined(HAVE_OSF1_OS)
 /* Apparently someone forgot to wrap getdomainname as a C function */
 extern "C" int getdomainname(char *name, int len);
 #endif
 
+#ifdef HAVE_OSF1_OS
+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
@@ -562,6 +592,7 @@ extern "C" long gethostid(void);
 #endif
 
 
+/* Disabled because it breaks internationalisation...
 #undef HAVE_SETLOCALE
 #ifdef HAVE_SETLOCALE
 #include <locale.h>
@@ -573,6 +604,7 @@ extern "C" long gethostid(void);
 #else
 #define nl_langinfo(x) ("ANSI_X3.4-1968")
 #endif
+*/
 
 /* Fake entry points if regex does not exist */
 #ifndef HAVE_REGEX_H