X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdbstuff.h;h=1bc4e1eaeede3fbd41f21790796fd843fd4fe147;hb=c29da374ab4ea587c810bdc0395443d6b6164fea;hp=a4ee603bb9cd45b66c090e935390409ba49fecc7;hpb=0a6c178c6c5f45668b5bb37b8be723cc9d1e72ae;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/dbstuff.h b/src/src/dbstuff.h index a4ee603bb..1bc4e1eae 100644 --- a/src/src/dbstuff.h +++ b/src/src/dbstuff.h @@ -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)