From 45329490797bbaf91000dfa992a97a811f306b70 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 27 Feb 2022 14:11:09 +0000 Subject: [PATCH] Build: Allow Local/Makefile "USE_NDBM=y" to override OS/Makefile-* --- doc/doc-docbook/spec.xfpt | 7 +++++++ src/src/buildconfig.c | 2 +- src/src/config.h.defaults | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 6c0ac922d..6ede1dc95 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -1841,6 +1841,9 @@ USE_DB=yes .endd Similarly, for gdbm you set USE_GDBM, and for tdb you set USE_TDB. An error is diagnosed if you set more than one of these. +.new +You can set USE_NDBM if needed to override an operating system default. +.wen At the lowest level, the build-time configuration sets none of these options, thereby assuming an interface of type (1). However, some operating system @@ -1855,7 +1858,11 @@ in one of these lines: .code DBMLIB = -ldb DBMLIB = -ltdb +DBMLIB = -lgdbm -lgdbm_compat .endd +.new +The last of those was for a Linux having GDBM provide emulated NDBM facilities. +.wen Settings like that will work if the DBM library is installed in the standard place. Sometimes it is not, and the library's header file may also not be in the default path. You may need to set INCLUDE to specify where the header diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c index a680b344a..a1b5485cd 100644 --- a/src/src/buildconfig.c +++ b/src/src/buildconfig.c @@ -51,7 +51,7 @@ typedef struct { char *data; } save_item; -static const char *db_opts[] = { "", "USE_DB", "USE_GDBM", "USE_TDB" }; +static const char *db_opts[] = { "", "USE_DB", "USE_GDBM", "USE_TDB", "USE_NDBM" }; static int have_ipv6 = 0; static int have_iconv = 0; diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults index 716f92ed3..65d33ac24 100644 --- a/src/src/config.h.defaults +++ b/src/src/config.h.defaults @@ -181,6 +181,7 @@ Do not put spaces between # and the 'define'. #define USE_GDBM #define USE_GNUTLS #define AVOID_GNUTLS_PKCS11 +#define USE_NDBM #define USE_OPENSSL #define USE_READLINE #define USE_TCP_WRAPPERS -- 2.30.2