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
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,...);
#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
#endif
+/* Disabled because it breaks internationalisation...
#undef HAVE_SETLOCALE
#ifdef HAVE_SETLOCALE
#include <locale.h>
#else
#define nl_langinfo(x) ("ANSI_X3.4-1968")
#endif
+*/
/* Fake entry points if regex does not exist */
#ifndef HAVE_REGEX_H