X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fbaconfig.h;h=146a701862b40b57ee0f0d70244d53f5385beec4;hb=1e32b9b18aa40e516767aae2503fe3d8620ef286;hp=c341826e7c6a3784d2ddeb5761aedc8549767fa5;hpb=a96ee8d3287489bcc6bca9d7841bb62b87992047;p=bacula%2Fbacula diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index c341826e7c..146a701862 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2008 Free Software Foundation Europe e.V. + Copyright (C) 2000-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -411,6 +411,7 @@ typedef int (INTHANDLER)(); #if defined(HAVE_WIN32) typedef int64_t boffset_t; +#define caddr_t char * #else typedef off_t boffset_t; #endif @@ -612,6 +613,9 @@ int m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...) #define bmalloc(size) b_malloc(__FILE__, __LINE__, (size)) #endif +/* Macro to simplify free/reset pointers */ +#define bfree_and_null(a) do{if(a){free(a); (a)=NULL;}} while(0) + /* * Replace codes needed in both file routines and non-file routines * Job replace codes -- in "replace" @@ -648,8 +652,7 @@ int m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...) #endif -#ifdef __alpha__ -#define OSF 1 +#ifdef HAVE_OSF1_OS #undef ioctl_req_t #define ioctl_req_t int #endif @@ -746,4 +749,7 @@ extern "C" int mknod ( const char *path, int mode, dev_t device ); #endif */ +/* Determine endiannes */ +static inline bool bigendian() { return htonl(1) == 1L; } + #endif /* _BACONFIG_H */