POSIX allows open() to be a macro; guard against it.
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 29 Aug 2007 14:02:22 +0000 (14:02 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 29 Aug 2007 14:02:22 +0000 (14:02 +0000)
doc/doc-txt/ChangeLog
src/src/dbstuff.h
src/src/search.c

index 6a399982720fe76df4a3d114dc52d41d19de96dc..087c67205cefe3601454dc1e8f47ed21cb00994a 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.528 2007/08/29 13:58:57 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.529 2007/08/29 14:02:22 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -99,6 +99,8 @@ PH/21 Added message_body_newlines option.
 
 PH/22 Guard against possible overflow in moan_check_errorcopy().
 
+PH/23 POSIX allows open() to be a macro; guard against that.
+
 
 Exim version 4.67
 -----------------
index 3298d78380297058798a8d56a8122be19e285a5b..2cbd8ca636324f14f437c5eaaba6115627ef630a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/dbstuff.h,v 1.6 2007/01/08 10:50:17 ph10 Exp $ */
+/* $Cambridge: exim/src/src/dbstuff.h,v 1.7 2007/08/29 14:02:22 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -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
index c8a1cb99516d41c20517ecc6792e8744621a58dc..86363a210a74d12871dfce90ab7c0380d71e1d07 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/search.c,v 1.5 2007/01/08 10:50:18 ph10 Exp $ */
+/* $Cambridge: exim/src/src/search.c,v 1.6 2007/08/29 14:02:22 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -397,7 +397,7 @@ if (lk->type == lookup_absfile && open_filecount >= lookup_open_max)
 /* 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;