summaryrefslogtreecommitdiff
path: root/dbm
diff options
context:
space:
mode:
Diffstat (limited to 'dbm')
-rw-r--r--dbm/NWGNUdbmdb28
-rw-r--r--dbm/NWGNUdbmgdbm28
-rw-r--r--dbm/NWGNUmakefile4
-rw-r--r--dbm/apr_dbm_berkeleydb.c6
-rw-r--r--dbm/apr_dbm_sdbm.c13
-rw-r--r--dbm/sdbm/sdbm.c8
6 files changed, 45 insertions, 42 deletions
diff --git a/dbm/NWGNUdbmdb b/dbm/NWGNUdbmdb
index e60e108d..748c32f5 100644
--- a/dbm/NWGNUdbmdb
+++ b/dbm/NWGNUdbmdb
@@ -11,11 +11,9 @@ SUBDIRS = \
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
-#include $(APR)\build\NWGNUcustom.inc
-
#
# build this level's files
@@ -27,8 +25,8 @@ endif
# for now defined here - should finally go into build/NWGNUenvironment.inc
DB_INC = $(DBSDK)/inc
-DB_IMP = $(DBSDK)/imp/libdb47.imp
-DB_LIB = $(DBSDK)/lib/libdb47.lib
+DB_IMP = libdb47.imp
+DB_LIB = libdb47.lib
DB_NLM = libdb47
#
@@ -38,8 +36,8 @@ DB_NLM = libdb47
XINCDIRS += \
$(APR)/include/arch/netware \
$(APR)/include \
- $(APRUTIL)/include \
- $(APRUTIL)/include/private \
+ $(APU)/include \
+ $(APU)/include/private \
$(APR) \
$(DB_INC) \
$(EOLIST)
@@ -69,6 +67,10 @@ ifdef LINK_STATIC
XLFLAGS += \
-l $(DBSDK)/lib \
$(EOLIST)
+else
+XLFLAGS += \
+ -l $(DBSDK)/imp \
+ $(EOLIST)
endif
#
@@ -151,12 +153,12 @@ NLM_STACK_SIZE = 8192
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -166,7 +168,7 @@ NLM_CHECK_SYM =
#
# If these are specified it will be used by the link '-flags' directive
#
-NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+NLM_FLAGS =
#
# If this is specified it will be linked in with the XDCData option in the def
@@ -201,7 +203,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
ifeq ($(LINK_STATIC),1)
@@ -244,7 +246,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -291,7 +293,7 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/dbm/NWGNUdbmgdbm b/dbm/NWGNUdbmgdbm
index 048f6fc7..ce61306f 100644
--- a/dbm/NWGNUdbmgdbm
+++ b/dbm/NWGNUdbmgdbm
@@ -11,11 +11,9 @@ SUBDIRS = \
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
-#include $(APR)\build\NWGNUcustom.inc
-
#
# build this level's files
@@ -27,8 +25,8 @@ endif
# for now defined here - should finally go into build/NWGNUenvironment.inc
GDBM_INC = $(GDBMSDK)/inc
-GDBM_IMP = $(GDBMSDK)/imp/libgdbm.imp
-GDBM_LIB = $(GDBMSDK)/lib/libgdbm.lib
+GDBM_IMP = libgdbm.imp
+GDBM_LIB = libgdbm.lib
GDBM_NLM = libgdbm
#
@@ -38,8 +36,8 @@ GDBM_NLM = libgdbm
XINCDIRS += \
$(APR)/include/arch/netware \
$(APR)/include \
- $(APRUTIL)/include \
- $(APRUTIL)/include/private \
+ $(APU)/include \
+ $(APU)/include/private \
$(APR) \
$(GDBM_INC) \
$(EOLIST)
@@ -68,6 +66,10 @@ ifdef LINK_STATIC
XLFLAGS += \
-l $(GDBMSDK)/lib \
$(EOLIST)
+else
+XLFLAGS += \
+ -l $(GDBMSDK)/imp \
+ $(EOLIST)
endif
#
@@ -150,12 +152,12 @@ NLM_STACK_SIZE = 8192
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -165,7 +167,7 @@ NLM_CHECK_SYM =
#
# If these are specified it will be used by the link '-flags' directive
#
-NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+NLM_FLAGS =
#
# If this is specified it will be linked in with the XDCData option in the def
@@ -200,7 +202,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
ifeq ($(LINK_STATIC),1)
@@ -243,7 +245,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -290,7 +292,7 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/dbm/NWGNUmakefile b/dbm/NWGNUmakefile
index e30372fa..9307b845 100644
--- a/dbm/NWGNUmakefile
+++ b/dbm/NWGNUmakefile
@@ -10,7 +10,7 @@ SUBDIRS = \
# paths to tools
#
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
#
# build this level's files
@@ -246,6 +246,6 @@ install :: nlms $(INSTDIRS) FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/dbm/apr_dbm_berkeleydb.c b/dbm/apr_dbm_berkeleydb.c
index 0cbab82b..32f2a063 100644
--- a/dbm/apr_dbm_berkeleydb.c
+++ b/dbm/apr_dbm_berkeleydb.c
@@ -37,13 +37,13 @@
* DB_185, DB2, DB3, and DB4.
*/
-#if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
+#if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR >= 4)
/* We will treat anything greater than 4.1 as DB4.
* We can treat 4.0 as DB3.
*/
-#if defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1)
+#if DB_VERSION_MAJOR > 4 || (defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1))
#define DB_VER 4
-#else
+#elif DB_VERSION_MAJOR == 4
#define DB_VER 3
#endif
#elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 3)
diff --git a/dbm/apr_dbm_sdbm.c b/dbm/apr_dbm_sdbm.c
index 6f531a17..e6cc4aa5 100644
--- a/dbm/apr_dbm_sdbm.c
+++ b/dbm/apr_dbm_sdbm.c
@@ -27,11 +27,11 @@
#include "apr_dbm_private.h"
#include "apr_sdbm.h"
-#define APR_DBM_DBMODE_RO (APR_READ | APR_BUFFERED)
-#define APR_DBM_DBMODE_RW (APR_READ | APR_WRITE)
-#define APR_DBM_DBMODE_RWCREATE (APR_READ | APR_WRITE | APR_CREATE)
-#define APR_DBM_DBMODE_RWTRUNC (APR_READ | APR_WRITE | APR_CREATE | \
- APR_TRUNCATE)
+#define APR_DBM_DBMODE_RO (APR_FOPEN_READ | APR_FOPEN_BUFFERED)
+#define APR_DBM_DBMODE_RW (APR_FOPEN_READ | APR_FOPEN_WRITE)
+#define APR_DBM_DBMODE_RWCREATE (APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE)
+#define APR_DBM_DBMODE_RWTRUNC (APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | \
+ APR_FOPEN_TRUNCATE)
static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
{
@@ -184,10 +184,9 @@ static apr_status_t vt_sdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
static apr_status_t vt_sdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
{
- apr_status_t rv;
apr_sdbm_datum_t rd;
- rv = apr_sdbm_nextkey(dbm->file, &rd);
+ (void)apr_sdbm_nextkey(dbm->file, &rd);
pkey->dptr = rd.dptr;
pkey->dsize = rd.dsize;
diff --git a/dbm/sdbm/sdbm.c b/dbm/sdbm/sdbm.c
index 9dfcc4bc..a1ce6953 100644
--- a/dbm/sdbm/sdbm.c
+++ b/dbm/sdbm/sdbm.c
@@ -101,7 +101,7 @@ static apr_status_t prep(apr_sdbm_t **pdb, const char *dirname, const char *pagn
* as required by this package. Also set our internal
* flag for RDONLY if needed.
*/
- if (!(flags & APR_WRITE)) {
+ if (!(flags & APR_FOPEN_WRITE)) {
db->flags |= SDBM_RDONLY;
}
@@ -111,12 +111,12 @@ static apr_status_t prep(apr_sdbm_t **pdb, const char *dirname, const char *pagn
* an apr_file_t, in case it's ever introduced, and set
* our own flag.
*/
- if (flags & APR_SHARELOCK) {
+ if (flags & APR_FOPEN_SHARELOCK) {
db->flags |= SDBM_SHARED;
- flags &= ~APR_SHARELOCK;
+ flags &= ~APR_FOPEN_SHARELOCK;
}
- flags |= APR_BINARY | APR_READ;
+ flags |= APR_FOPEN_BINARY | APR_FOPEN_READ;
/*
* open the files in sequence, and stat the dirfile.