SPDX: Mass-update to GPL-2.0-or-later
[exim.git] / src / src / hintsdb.h
index d7116f7c3ad963a0b20899b06e96e43cca2b8285..2d7199edab4d44d76259413e1a233b1d025ce1d6 100644 (file)
@@ -2,9 +2,10 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2018 */
 /* Copyright (c) The Exim Maintainers 2020 - 2022 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 /* This header file contains macro definitions so that a variety of DBM
 libraries can be used by Exim. Nigel Metheringham provided the original set for
@@ -17,7 +18,7 @@ For convenience, the definitions of the structures used in the various hints
 databases are also kept in this file, which is used by the maintenance
 utilities as well as the main Exim binary. */
 
-#if !defined(HINTSDB_H) && !defined(MACRO_PREDEF)
+#ifndef HINTSDB_H
 #define HINTSDB_H
 
 
@@ -203,7 +204,11 @@ at DB release 4.3. */
 
 static inline void
 dbfn_bdb_error_callback(const DB_ENV * dbenv, const char * pfx, const char * msg)
-{ log_write(0, LOG_MAIN, "Berkeley DB error: %s", msg); }
+{
+#ifndef MACRO_PREDEF 
+log_write(0, LOG_MAIN, "Berkeley DB error: %s", msg);
+#endif
+}
 
 
 
@@ -746,7 +751,7 @@ exim_datum_free(EXIM_DATUM * d)
 
 
 
-#ifdef COMPILE_UTILITY
+#if defined(COMPILE_UTILITY) || defined(MACRO_PREDEF)
 
 static inline EXIM_DB *
 exim_dbopen(const uschar * name, const uschar * dirname, int flags,
@@ -797,7 +802,7 @@ DEBUG(D_hints_lookup) debug_printf_indent("EXIM_DBCLOSE(%p)\n", dbp);
 exim_dbclose__(dbp);
 }
 
-# endif                /* COMPILE_UTILITY */
+# endif                /* defined(COMPILE_UTILITY) || defined(MACRO_PREDEF) */
 
 /********************* End of dbm library definitions **********************/