diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-08-29 14:02:22 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-08-29 14:02:22 +0000 |
commit | 19897d528de779d4d3804fd7d10c235e8b50a53e (patch) | |
tree | 7c5b2e9372fc05f6c8ec52cbf4e860da17750594 /src | |
parent | ce9f225cdc4df2e3f2122b67e297b9f4aef1edb7 (diff) |
POSIX allows open() to be a macro; guard against it.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/dbstuff.h | 6 | ||||
-rw-r--r-- | src/src/search.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/src/dbstuff.h b/src/src/dbstuff.h index 3298d7838..2cbd8ca63 100644 --- a/src/src/dbstuff.h +++ b/src/src/dbstuff.h @@ -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 diff --git a/src/src/search.c b/src/src/search.c index c8a1cb995..86363a210 100644 --- a/src/src/search.c +++ b/src/src/search.c @@ -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; |