X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdbfunctions.h;h=1f0dec1f7f0c6703ba9d68bf9f848c3b8fb149c5;hb=4f7a93c27e3d43b44c42d3fc503f03b9b42ca622;hp=6a1fa90774d576963e2c60f622635daafdf727e9;hpb=d7d7b7b91dd75cec636fc144da7e27eed860f971;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/dbfunctions.h b/src/src/dbfunctions.h index 6a1fa9077..1f0dec1f7 100644 --- a/src/src/dbfunctions.h +++ b/src/src/dbfunctions.h @@ -1,21 +1,24 @@ -/* $Cambridge: exim/src/src/dbfunctions.h,v 1.4 2006/02/07 11:19:00 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) The Exim Maintainers 2022 */ +/* Copyright (c) University of Cambridge 1995 - 2021 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef DBFUNCTIONS_H +#define DBFUNCTIONS_H /* Functions for reading/writing exim database files */ void dbfn_close(open_db *); -int dbfn_delete(open_db *, uschar *); -open_db *dbfn_open(uschar *, int, open_db *, BOOL); -void *dbfn_read_with_length(open_db *, uschar *, int *); +int dbfn_delete(open_db *, const uschar *); +open_db *dbfn_open(uschar *, int, open_db *, BOOL, BOOL); +void *dbfn_read_with_length(open_db *, const uschar *, int *); +void *dbfn_read_enforce_length(open_db *, const uschar *, size_t); uschar *dbfn_scan(open_db *, BOOL, EXIM_CURSOR **); -int dbfn_write(open_db *, uschar *, void *, int); +int dbfn_write(open_db *, const uschar *, void *, int); /* Macro for the common call to read without wanting to know the length. */ @@ -25,11 +28,12 @@ int dbfn_write(open_db *, uschar *, void *, int); changed at release 4.3. */ #if defined(USE_DB) && defined(DB_VERSION_STRING) -#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3) +# if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3) void dbfn_bdb_error_callback(const DB_ENV *, const char *, const char *); -#else +# else void dbfn_bdb_error_callback(const char *, char *); -#endif +# endif #endif +#endif /* End of dbfunctions.h */