Testsuite: OpenSSL version output variances
[exim.git] / src / src / dbstuff.h
index a4ee603bb9cd45b66c090e935390409ba49fecc7..1bc4e1eaeede3fbd41f21790796fd843fd4fe147 100644 (file)
@@ -116,13 +116,19 @@ definition of DB_VERSION_STRING, which is present in versions 2.x onwards. */
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
 # define EXIM_DB       DB_ENV
 /* Cursor type, for scanning */
-#define EXIM_CURSOR   DBC
+# define EXIM_CURSOR   DBC
 
 /* The datum type used for queries */
-#define EXIM_DATUM    DBT
+# define EXIM_DATUM    DBT
 
 /* Some text for messages */
-#define EXIM_DBTYPE   "db (v4.1+)"
+# define EXIM_DBTYPE   "db (v4.1+)"
+
+/* Only more-recent versions.  5+ ? */
+# ifndef DB_FORCESYNC
+#  define DB_FORCESYNC 0
+# endif
+
 
 /* Access functions */
 
@@ -626,8 +632,12 @@ after reading data. */
 #  define EXIM_DBOPEN(name, dirname, flags, mode, dbpp) \
   do { \
   DEBUG(D_hints_lookup) \
-    debug_printf("EXIM_DBOPEN: file <%s> dir <%s> flags 0x%x\n", \
-      (name), (dirname), flags); \
+    debug_printf("EXIM_DBOPEN: file <%s> dir <%s> flags=%s\n", \
+      (name), (dirname),               \
+      (flags) == O_RDONLY ? "O_RDONLY" \
+      : (flags) == O_RDWR ? "O_RDWR"   \
+      : (flags) == (O_RDWR|O_CREAT) ? "O_RDWR|O_CREAT" \
+      : "??"); \
   EXIM_DBOPEN__(name, dirname, flags, mode, dbpp); \
   DEBUG(D_hints_lookup) debug_printf("returned from EXIM_DBOPEN: %p\n", *dbpp); \
   } while(0)