]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/baconfig.h
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / bacula / src / baconfig.h
index 2d149c02f88bc328eb0ff4e57b51d7cc078732ec..08623a7a92cc306f8fe55663f50c82461276ca6a 100644 (file)
@@ -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,8 +613,8 @@ int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...)
 #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