Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.
[samba.git] / source3 / include / includes.h
index 58c6ee01bdc720fc348e5c837114fecb0018ba8f..0d2561f6bcb0128e0caa422805cc67dda258592e 100644 (file)
 #endif
 
 
+/* if we have both SYSV IPC and shared mmap then we need to choose. For most
+   systems it is much faster to use SYSV IPC, but under Linux it is
+   about 5 times faster to use fcntl, so for Linux systems we force
+   fcntl based locking */
+#if (defined(HAVE_SYSV_IPC) && defined(HAVE_SHARED_MMAP))
+# ifdef LINUX
+#  undef HAVE_SYSV_IPC
+# else
+#  undef HAVE_SHARED_MMAP
+# endif
+#endif
+
+
 #include <sys/types.h>
 
 #ifdef TIME_WITH_SYS_TIME
 # endif
 #endif
 
-#ifdef HAVE_SHARED_MMAP
+#ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
 
 #endif
 #endif /* HAVE_NETGROUP */
 
+#if defined(HAVE_MYSQL_H)
+#include <mysql.h>
+#else
+/* needed to get make proto to work with no <mysql.h> */
+#define MYSQL     void
+#define MYSQL_ROW void
+#endif
+
 #ifndef uchar
 #define uchar unsigned char
 #endif
@@ -539,8 +560,6 @@ extern int errno;
 #include "ubi_Cache.h"
 #endif /* UBI_BINTREE_H */
 
-#include "debugparse.h"
-
 #include "version.h"
 #include "smb.h"
 #include "smbw.h"