/*
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.
#if defined(HAVE_WIN32)
typedef int64_t boffset_t;
+#define caddr_t char *
#else
typedef off_t boffset_t;
#endif
#define bmalloc(size) b_malloc(__FILE__, __LINE__, (size))
#endif
-/* Function to simplify free/reset pointers */
-inline void bfree_and_null(void *&a) { if (a) { free(a); a = NULL; } }
+/* 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
#endif
-#ifdef __alpha__
-#define OSF 1
+#ifdef HAVE_OSF1_OS
#undef ioctl_req_t
#define ioctl_req_t int
#endif
#endif
*/
+/* Determine endiannes */
+static inline bool bigendian() { return htonl(1) == 1L; }
+
#endif /* _BACONFIG_H */