Re: [exim-dev] Preparing for 4.68

Góra strony
Delete this message
Reply to this message
Autor: David Woodhouse
Data:  
Dla: exim-dev
Temat: Re: [exim-dev] Preparing for 4.68
On Thu, 2007-08-23 at 14:44 +0100, Philip Hazel wrote:
> I have now done all I intend to do to the code for the 4.68 release,
> and I have started working on updating the manual. If anybody else has
> any urgent patches that fix bugs, please get them submitted asap. I
> don't want to add any more functionality (unless it's totally, totally
> trivial) now.


POSIX allows open() to be a macro, ill-advised though many think it is
for a libc to actually _do_ that.

This fixes the build.

--- exim-4.67/src/dbstuff.h~    2007-04-17 14:06:39.000000000 +0100
+++ exim-4.67/src/dbstuff.h    2007-08-22 18:10:52.000000000 +0100
@@ -135,7 +135,7 @@ API changed for DB 4.1. */
 #define EXIM_DBOPEN(name, flags, mode, dbpp) \
        if (db_create(dbpp, NULL, 0) != 0 || \
          ((*dbpp)->set_errcall(*dbpp, dbfn_bdb_error_callback), \
-         (*dbpp)->open(*dbpp, NULL, CS name, NULL, \
+      ((*dbpp)->open)(*dbpp, NULL, CS name, NULL,        \
          ((flags) == O_RDONLY)? DB_UNKNOWN : DB_HASH, \
          ((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
          mode)) != 0) *(dbpp) = NULL
@@ -143,7 +143,7 @@ API changed for DB 4.1. */
 #define EXIM_DBOPEN(name, flags, mode, dbpp) \
        if (db_create(dbpp, NULL, 0) != 0 || \
          ((*dbpp)->set_errcall(*dbpp, dbfn_bdb_error_callback), \
-         (*dbpp)->open(*dbpp, CS name, NULL, \
+      ((*dbpp)->open)(*dbpp, CS name, NULL,            \
          ((flags) == O_RDONLY)? DB_UNKNOWN : DB_HASH, \
          ((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
          mode)) != 0) *(dbpp) = NULL
--- exim-4.67/src/search.c~    2007-04-17 14:06:40.000000000 +0100
+++ exim-4.67/src/search.c    2007-08-22 18:57:33.000000000 +0100
@@ -397,7 +397,7 @@ if (lk->type == lookup_absfile && open_f
 /* If opening is successful, call the file-checking function if there is one,
 and if all is still well, enter the open database into the tree. */


-handle = lk->open(filename, &search_error_message);
+handle = (lk->open)(filename, &search_error_message);
if (handle == NULL)
{
store_pool = old_pool;

--
dwmw2