apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apr-util/src/dbm Makefile.in apr_dbm.c
Date Wed, 06 Dec 2000 02:19:51 GMT
gstein      00/12/05 18:19:50

  Modified:    .        Makefile.in buildconf.sh configure.in
               build    rules.mk.in
               include  .cvsignore apr_dbm.h apu_private.h.in
                        apu_private.hw
               src/dbm  Makefile.in apr_dbm.c
  Added:       build    apu-conf.m4
  Log:
  *) add apr_dbm to the build (was apu_dbm)
     - rename interface from apu_dbm_* to apr_dbm_*
     - add include files: apu_private.h.in and apu_private.hw
     - update include/.cvsignore for apu_private.h
     - add apr_dbm.lo to the build in src/dbm/
  
  *) move building of aprutil.exports into the top-level Makefile so that we
     can use APR's directory (rather than needing to pass it to buildconf.sh)
  
  *) add build/apu-conf.m4 to contain two APRUTIL macros
     - APU_FIND_APR: find the APR directory, using --with-apr if provided
       (this was moved from configure.in)
     - APU_CHECK_DBM: determine which DBM type to use for apr_dbm. This macro
       comes from Apache 2.0's acinclude.m4 file.
  
  *) fix top-level make to delete the lib if a newer object file is found,
     thus forcing a relink to pick up the object file.
  
  *) tweak to build/rules.mk.in to publish APR_SOURCE_DIR to the makefiles
  
  Revision  Changes    Path
  1.4       +19 -2     apr-util/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- Makefile.in	2000/12/05 20:32:51	1.3
  +++ Makefile.in	2000/12/06 02:19:45	1.4
  @@ -2,8 +2,10 @@
   # Top-level Makefile for APRUTIL
   #
   
  -TARGETS = libaprutil.la
  +TARGET_LIB = libaprutil.la
   
  +TARGETS = delete-lib $(TARGET_LIB) aprutil.exports
  +
   top_builddir = @top_builddir@
   include $(top_builddir)/build/rules.mk
   
  @@ -15,8 +17,23 @@
   
   ### fix this up at some point (install location)
   libdir = /usr/local/lib
  +
  +delete-lib:
  +	@if test -f $(TARGET_LIB); then \
  +	    objects="`find src -name '*.lo' -a -newer $(TARGET_LIB)`" ; \
  +	    if test -n "$$objects"; then \
  +		echo Found newer objects. Will relink $(TARGET_LIB). ; \
  +		echo $(RM) -f $(TARGET_LIB) ; \
  +		$(RM) -f $(TARGET_LIB) ; \
  +	    fi \
  +	fi
   
  -libaprutil.la:
  +$(TARGET_LIB):
   	@objects="`find src -name '*.lo'`" ; \
   	    echo $(LINK) $$objects ; \
   	    $(LINK) -rpath $(libdir) $$objects
  +
  +aprutil.exports:
  +	perl @APR_SOURCE_DIR@/helpers/make_export.pl -o $@ include/*.h
  +
  +.PHONY: delete-lib
  
  
  
  1.3       +3 -11     apr-util/buildconf.sh
  
  Index: buildconf.sh
  ===================================================================
  RCS file: /home/cvs/apr-util/buildconf.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- buildconf.sh	2000/12/05 18:29:07	1.2
  +++ buildconf.sh	2000/12/06 02:19:45	1.3
  @@ -1,17 +1,14 @@
   #!/bin/sh
   
   #
  -# Get a copy of libtool's libtool.m4 and copy it into our aclocal.m4
  +# Build aclocal.m4 from libtool's libtool.m4 and our own M4 files.
   #
  -# If we ever have our own .m4 files, then we will want to concatenate
  -# them altogether into aclocal.m4
  -#
  -### we may need to get smarter with these two lines
  +### we may need to get smarter with these two lines (e.g. PrintPath)
   ltpath=`which libtoolize`
   ltpath=`dirname $ltpath`
   ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
   echo "Incorporating $ltfile into aclocal.m4 ..."
  -cat $ltfile > aclocal.m4
  +cat build/apu-conf.m4 $ltfile > aclocal.m4
   
   #
   # Create the libtool helper files
  @@ -30,8 +27,3 @@
   echo "Creating configure ..."
   ### do some work to toss config.cache?
   autoconf
  -
  -if [ ! -z $1 ]; then
  -    echo "Creating list of exported symbols in aprutil.exports ..."
  -    perl $1/helpers/make_export.pl -o ./aprutil.exports include/*.h
  -fi
  
  
  
  1.2       +5 -26     apr-util/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr-util/configure.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- configure.in	2000/12/02 16:13:46	1.1
  +++ configure.in	2000/12/06 02:19:45	1.2
  @@ -12,34 +12,12 @@
   AC_CHECK_PROG(RM, rm, rm)
   
   dnl
  -dnl figure out where APR is located
  +dnl 1. Find the APR includes directory and (possibly) the source (base) dir.
  +dnl 2. Determine what DBM backend type to use.
   dnl
  -AC_MSG_CHECKING(for APR)
  -AC_ARG_WITH(apr,
  -[  --with-apr=DIR         path to APR source or the APR includes.],
  -[
  -    if test "$withval" = "yes"; then
  -        AC_MSG_ERROR(You need to specify a directory with --with-apr)
  -    fi
  -    absdir="`cd $withval ; pwd`"
  -    if test -f "$absdir/apr_pools.h"; then
  -	APR_INCLUDES="$absdir"
  -    elif test -f "$absdir/include/apr_pools.h"; then
  -	APR_INCLUDES="$absdir/include"
  -    fi
  -],[
  -    dnl see if we can find APR
  -    if test -f "$srcdir/apr/include/apr_pools.h"; then
  -	APR_INCLUDES="$srcdir/apr/include"
  -    fi
  -])
  -if test -z "$APR_INCLUDES"; then
  -    AC_MSG_RESULT(not found)
  -    AC_MSG_ERROR(APR could not be located. Please use the --with-apr option.)
  -fi
  -AC_MSG_RESULT($APR_INCLUDES)
  +APU_FIND_APR
  +APU_CHECK_DBM
   
  -
   dnl
   dnl compute the top directory of the build
   dnl
  @@ -64,6 +42,7 @@
   	Makefile
   	build/Makefile
   	build/rules.mk
  +	include/apu_private.h
   	src/Makefile
   	src/buckets/Makefile
   	src/crypto/Makefile
  
  
  
  1.3       +1 -0      apr-util/build/rules.mk.in
  
  Index: rules.mk.in
  ===================================================================
  RCS file: /home/cvs/apr-util/build/rules.mk.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- rules.mk.in	2000/12/02 17:42:38	1.2
  +++ rules.mk.in	2000/12/06 02:19:47	1.3
  @@ -60,6 +60,7 @@
   # Configuration variables
   #
   top_builddir=@top_builddir@
  +APR_SOURCE_DIR=@APR_SOURCE_DIR@
   
   CC=@CC@
   LIBTOOL=@LIBTOOL@
  
  
  
  1.1                  apr-util/build/apu-conf.m4
  
  Index: apu-conf.m4
  ===================================================================
  dnl
  dnl custom autoconf rules for APRUTIL
  dnl
  
  dnl
  dnl APU_FIND_APR: figure out where APR is located
  dnl
  AC_DEFUN(APU_FIND_APR,[
  
  AC_MSG_CHECKING(for APR)
  AC_ARG_WITH(apr,
  [  --with-apr=DIR          path to APR source or the APR includes],
  [
      if test "$withval" = "yes"; then
          AC_MSG_ERROR(You need to specify a directory with --with-apr)
      fi
      absdir="`cd $withval ; pwd`"
      if test -f "$absdir/apr_pools.h"; then
  	APR_INCLUDES="$absdir"
      elif test -f "$absdir/include/apr_pools.h"; then
  	APR_SOURCE_DIR="$absdir"
      fi
  ],[
      dnl see if we can find APR
      if test -f "$srcdir/apr/include/apr_pools.h"; then
  	APR_SOURCE_DIR="$srcdir/apr"
      elif test -f "$srcdir/../apr/include/apr_pools.h"; then
  	APR_SOURCE_DIR="`cd $srcdir/../apr ; pwd`"
      fi
  ])
  if test -n "$APR_SOURCE_DIR"; then
      APR_INCLUDES="$APR_SOURCE_DIR/include"
  fi
  if test -z "$APR_INCLUDES"; then
      AC_MSG_RESULT(not found)
      AC_MSG_ERROR(APR could not be located. Please use the --with-apr option.)
  fi
  AC_MSG_RESULT($APR_INCLUDES)
  
  AC_SUBST(APR_SOURCE_DIR)
  ])
  
  dnl
  dnl APU_CHECK_DBM: see what kind of DBM backend to use for apr_dbm.
  dnl
  AC_DEFUN(APU_CHECK_DBM,[
  
  apu_use_sdbm=0
  apu_use_gdbm=0
  AC_MSG_CHECKING(for chosen DBM type)
  AC_ARG_WITH(dbm,
    [  --with-dbm=DBM          choose the DBM type to use. DBM={sdbm,gdbm}],[
    if test "$withval" = "yes"; then
      AC_MSG_ERROR([You need to specify a DBM type to use. One of: sdbm, gdbm])
    fi
    case "$withval" in
      sdbm)
        apu_use_sdbm=1
        AC_MSG_RESULT(sdbm)
        ;;
      gdbm)
        apu_use_gdbm=1
        AC_MSG_RESULT(gdbm)
        ;;
      *)
        AC_MSG_ERROR([$withval is an unknown DBM type. Use one of: sdbm, gdbm])
        ;;
    esac
  ],[
    apu_use_sdbm=1
    AC_MSG_RESULT([sdbm (default)])
  ])
  AC_SUBST(apu_use_sdbm)
  AC_SUBST(apu_use_gdbm)
  
  if test $apu_use_gdbm = 1; then
    AC_CHECK_LIB(gdbm, gdbm_open)
  fi
  
  ])
  
  
  
  1.2       +1 -0      apr-util/include/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/apr-util/include/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- .cvsignore	2000/12/05 03:50:40	1.1
  +++ .cvsignore	2000/12/06 02:19:48	1.2
  @@ -1,2 +1,3 @@
   apu_config.h.in
   apu_config.h
  +apu_private.h
  
  
  
  1.2       +15 -15    apr-util/include/apr_dbm.h
  
  Index: apr_dbm.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_dbm.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- apr_dbm.h	2000/11/26 13:43:32	1.1
  +++ apr_dbm.h	2000/12/06 02:19:48	1.2
  @@ -63,7 +63,7 @@
   extern "C" {
   #endif
   
  -typedef struct apu_dbm_t apu_dbm_t;
  +typedef struct apr_dbm_t apr_dbm_t;
   
   typedef struct
   {
  @@ -72,24 +72,24 @@
   } apu_datum_t;
   
   /* modes to open the DB */
  -#define APU_DBM_READONLY        1       /* open for read-only access */
  -#define APU_DBM_READWRITE       2       /* open for read-write access */
  -#define APU_DBM_RWCREATE        3       /* open for r/w, create if needed */
  +#define APR_DBM_READONLY        1       /* open for read-only access */
  +#define APR_DBM_READWRITE       2       /* open for read-write access */
  +#define APR_DBM_RWCREATE        3       /* open for r/w, create if needed */
   
   
  -apr_status_t apu_dbm_open(const char *pathname, apr_pool_t *pool, int mode,
  -                          apu_dbm_t **pdb);
  -void apu_dbm_close(apu_dbm_t *db);
  -apr_status_t apu_dbm_fetch(apu_dbm_t *db, apu_datum_t key,
  +apr_status_t apr_dbm_open(const char *pathname, apr_pool_t *pool, int mode,
  +                          apr_dbm_t **pdb);
  +void apr_dbm_close(apr_dbm_t *db);
  +apr_status_t apr_dbm_fetch(apr_dbm_t *db, apu_datum_t key,
                              apu_datum_t *pvalue);
  -apr_status_t apu_dbm_store(apu_dbm_t *db, apu_datum_t key, apu_datum_t value);
  -apr_status_t apu_dbm_delete(apu_dbm_t *db, apu_datum_t key);
  -int apu_dbm_exists(apu_dbm_t *db, apu_datum_t key);
  -apr_status_t apu_dbm_firstkey(apu_dbm_t *db, apu_datum_t *pkey);
  -apr_status_t apu_dbm_nextkey(apu_dbm_t *db, apu_datum_t *pkey);
  -void apu_dbm_freedatum(apu_dbm_t *db, apu_datum_t data);
  +apr_status_t apr_dbm_store(apr_dbm_t *db, apu_datum_t key, apu_datum_t value);
  +apr_status_t apr_dbm_delete(apr_dbm_t *db, apu_datum_t key);
  +int apr_dbm_exists(apr_dbm_t *db, apu_datum_t key);
  +apr_status_t apr_dbm_firstkey(apr_dbm_t *db, apu_datum_t *pkey);
  +apr_status_t apr_dbm_nextkey(apr_dbm_t *db, apu_datum_t *pkey);
  +void apr_dbm_freedatum(apr_dbm_t *db, apu_datum_t data);
   
  -void apu_dbm_geterror(apu_dbm_t *db, int *errcode, const char **errmsg);
  +void apr_dbm_geterror(apr_dbm_t *db, int *errcode, const char **errmsg);
   
   #ifdef __cplusplus
   }
  
  
  
  1.2       +1 -1      apr-util/include/apu_private.h.in
  
  Index: apu_private.h.in
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apu_private.h.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- apu_private.h.in	2000/11/28 12:09:54	1.1
  +++ apu_private.h.in	2000/12/06 02:19:48	1.2
  @@ -56,7 +56,7 @@
   #define APU_PRIVATE_H
   
   /*
  -** The following macros control what features APUTIL will use
  +** The following macros control what features APRUTIL will use
   */
   #define APU_USE_SDBM	@apu_use_sdbm@
   #define APU_USE_GDBM	@apu_use_gdbm@
  
  
  
  1.2       +1 -1      apr-util/include/apu_private.hw
  
  Index: apu_private.hw
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apu_private.hw,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- apu_private.hw	2000/11/29 17:24:56	1.1
  +++ apu_private.hw	2000/12/06 02:19:48	1.2
  @@ -56,7 +56,7 @@
   #define APU_PRIVATE_H
   
   /*
  -** The following macros control what features APUTIL will use
  +** The following macros control what features APRUTIL will use
   */
   #define APU_USE_SDBM	1
   #define APU_USE_GDBM	0
  
  
  
  1.2       +1 -0      apr-util/src/dbm/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/src/dbm/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- Makefile.in	2000/12/02 16:13:48	1.1
  +++ Makefile.in	2000/12/06 02:19:50	1.2
  @@ -1,3 +1,4 @@
  +TARGETS = apr_dbm.lo
   
   top_builddir = @top_builddir@
   include $(top_builddir)/build/rules.mk
  
  
  
  1.5       +49 -49    apr-util/src/dbm/apr_dbm.c
  
  Index: apr_dbm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/src/dbm/apr_dbm.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- apr_dbm.c	2000/11/28 12:09:53	1.4
  +++ apr_dbm.c	2000/12/06 02:19:50	1.5
  @@ -57,7 +57,7 @@
   #include "apr_pools.h"
   
   #include "apu_private.h"
  -#include "apu_dbm.h"
  +#include "apr_dbm.h"
   
   #if APU_USE_SDBM
   #include "sdbm.h"
  @@ -65,17 +65,17 @@
   typedef SDBM *real_file_t;
   typedef sdbm_datum real_datum_t;
   
  -#define APU_DBM_CLOSE(f)	sdbm_close(f)
  -#define APU_DBM_FETCH(f, k)	sdbm_fetch((f), (k))
  -#define APU_DBM_STORE(f, k, v)	sdbm_store((f), (k), (v), SDBM_REPLACE)
  -#define APU_DBM_DELETE(f, k)	sdbm_delete((f), (k))
  -#define APU_DBM_FIRSTKEY(f)	sdbm_firstkey(f)
  -#define APU_DBM_NEXTKEY(f, k)	sdbm_nextkey(f)
  -#define APU_DBM_FREEDATUM(f, d)	if (0) ; else	/* stop "no effect" warning */
  -
  -#define APU_DBM_DBMODE_RO       APR_READ
  -#define APU_DBM_DBMODE_RW       (APR_READ | APR_WRITE)
  -#define APU_DBM_DBMODE_RWCREATE (APR_READ | APR_WRITE | APR_CREATE)
  +#define APR_DBM_CLOSE(f)	sdbm_close(f)
  +#define APR_DBM_FETCH(f, k)	sdbm_fetch((f), (k))
  +#define APR_DBM_STORE(f, k, v)	sdbm_store((f), (k), (v), SDBM_REPLACE)
  +#define APR_DBM_DELETE(f, k)	sdbm_delete((f), (k))
  +#define APR_DBM_FIRSTKEY(f)	sdbm_firstkey(f)
  +#define APR_DBM_NEXTKEY(f, k)	sdbm_nextkey(f)
  +#define APR_DBM_FREEDATUM(f, d)	if (0) ; else	/* stop "no effect" warning */
  +
  +#define APR_DBM_DBMODE_RO       APR_READ
  +#define APR_DBM_DBMODE_RW       (APR_READ | APR_WRITE)
  +#define APR_DBM_DBMODE_RWCREATE (APR_READ | APR_WRITE | APR_CREATE)
   
   #elif APU_USE_GDBM
   #include <gdbm.h>
  @@ -84,17 +84,17 @@
   typedef GDBM_FILE real_file_t;
   typedef datum real_datum_t;
   
  -#define APU_DBM_CLOSE(f)	gdbm_close(f)
  -#define APU_DBM_FETCH(f, k)	gdbm_fetch((f), (k))
  -#define APU_DBM_STORE(f, k, v)	g2s(gdbm_store((f), (k), (v), GDBM_REPLACE))
  -#define APU_DBM_DELETE(f, k)	g2s(gdbm_delete((f), (k)))
  -#define APU_DBM_FIRSTKEY(f)	gdbm_firstkey(f)
  -#define APU_DBM_NEXTKEY(f, k)	gdbm_nextkey((f), (k))
  -#define APU_DBM_FREEDATUM(f, d)	((d).dptr ? free((d).dptr) : 0)
  -
  -#define APU_DBM_DBMODE_RO       GDBM_READER
  -#define APU_DBM_DBMODE_RW       GDBM_WRITER
  -#define APU_DBM_DBMODE_RWCREATE GDBM_WRCREAT
  +#define APR_DBM_CLOSE(f)	gdbm_close(f)
  +#define APR_DBM_FETCH(f, k)	gdbm_fetch((f), (k))
  +#define APR_DBM_STORE(f, k, v)	g2s(gdbm_store((f), (k), (v), GDBM_REPLACE))
  +#define APR_DBM_DELETE(f, k)	g2s(gdbm_delete((f), (k)))
  +#define APR_DBM_FIRSTKEY(f)	gdbm_firstkey(f)
  +#define APR_DBM_NEXTKEY(f, k)	gdbm_nextkey((f), (k))
  +#define APR_DBM_FREEDATUM(f, d)	((d).dptr ? free((d).dptr) : 0)
  +
  +#define APR_DBM_DBMODE_RO       GDBM_READER
  +#define APR_DBM_DBMODE_RW       GDBM_WRITER
  +#define APR_DBM_DBMODE_RWCREATE GDBM_WRCREAT
   
   /* map a GDBM error to an apr_status_t */
   static apr_status_t g2s(int gerr)
  @@ -112,7 +112,7 @@
   #endif
   
   
  -struct apu_dbm_t
  +struct apr_dbm_t
   {
       apr_pool_t *pool;
       real_file_t file;
  @@ -126,7 +126,7 @@
   #define R2A_DATUM(d)    (*(apu_datum_t *)&(d))
   
   
  -static apr_status_t set_error(apu_dbm_t *db)
  +static apr_status_t set_error(apr_dbm_t *db)
   {
       apr_status_t rv = APR_SUCCESS;
   
  @@ -161,8 +161,8 @@
       return rv;
   }
   
  -apr_status_t apu_dbm_open(const char *pathname, apr_pool_t *pool, int mode,
  -                          apu_dbm_t **pdb)
  +apr_status_t apr_dbm_open(const char *pathname, apr_pool_t *pool, int mode,
  +                          apr_dbm_t **pdb)
   {
       real_file_t file;
       int dbmode;
  @@ -170,14 +170,14 @@
       *pdb = NULL;
   
       switch (mode) {
  -    case APU_DBM_READONLY:
  -        dbmode = APU_DBM_DBMODE_RO;
  +    case APR_DBM_READONLY:
  +        dbmode = APR_DBM_DBMODE_RO;
           break;
  -    case APU_DBM_READWRITE:
  -        dbmode = APU_DBM_DBMODE_RW;
  +    case APR_DBM_READWRITE:
  +        dbmode = APR_DBM_DBMODE_RW;
           break;
  -    case APU_DBM_RWCREATE:
  -        dbmode = APU_DBM_DBMODE_RWCREATE;
  +    case APR_DBM_RWCREATE:
  +        dbmode = APR_DBM_DBMODE_RWCREATE;
           break;
       default:
           return APR_EINVAL;
  @@ -208,25 +208,25 @@
       return APR_SUCCESS;
   }
   
  -void apu_dbm_close(apu_dbm_t *db)
  +void apr_dbm_close(apr_dbm_t *db)
   {
  -    APU_DBM_CLOSE(db->file);
  +    APR_DBM_CLOSE(db->file);
   }
   
  -apr_status_t apu_dbm_fetch(apu_dbm_t *db, apu_datum_t key, apu_datum_t *pvalue)
  +apr_status_t apr_dbm_fetch(apr_dbm_t *db, apu_datum_t key, apu_datum_t *pvalue)
   {
  -    *(real_datum_t *) pvalue = APU_DBM_FETCH(db->file, A2R_DATUM(key));
  +    *(real_datum_t *) pvalue = APR_DBM_FETCH(db->file, A2R_DATUM(key));
   
       /* store the error info into DB, and return a status code. Also, note
          that *pvalue should have been cleared on error. */
       return set_error(db);
   }
   
  -apr_status_t apu_dbm_store(apu_dbm_t *db, apu_datum_t key, apu_datum_t value)
  +apr_status_t apr_dbm_store(apr_dbm_t *db, apu_datum_t key, apu_datum_t value)
   {
       apr_status_t rv;
   
  -    rv = APU_DBM_STORE(db->file, A2R_DATUM(key), A2R_DATUM(value));
  +    rv = APR_DBM_STORE(db->file, A2R_DATUM(key), A2R_DATUM(value));
   
       /* ### is this the right handling of set_error() and rv? */
   
  @@ -237,11 +237,11 @@
       return rv;
   }
   
  -apr_status_t apu_dbm_delete(apu_dbm_t *db, apu_datum_t key)
  +apr_status_t apr_dbm_delete(apr_dbm_t *db, apu_datum_t key)
   {
       apr_status_t rv;
   
  -    rv = APU_DBM_DELETE(db->file, A2R_DATUM(key));
  +    rv = APR_DBM_DELETE(db->file, A2R_DATUM(key));
   
       /* ### is this the right handling of set_error() and rv? */
   
  @@ -252,7 +252,7 @@
       return rv;
   }
   
  -int apu_dbm_exists(apu_dbm_t *db, apu_datum_t key)
  +int apr_dbm_exists(apr_dbm_t *db, apu_datum_t key)
   {
       int exists;
   
  @@ -268,30 +268,30 @@
       return exists;
   }
   
  -apr_status_t apu_dbm_firstkey(apu_dbm_t *db, apu_datum_t *pkey)
  +apr_status_t apr_dbm_firstkey(apr_dbm_t *db, apu_datum_t *pkey)
   {
  -    *(real_datum_t *) pkey = APU_DBM_FIRSTKEY(db->file);
  +    *(real_datum_t *) pkey = APR_DBM_FIRSTKEY(db->file);
   
       /* store the error info into DB, and return a status code. Also, note
          that *pvalue should have been cleared on error. */
       return set_error(db);
   }
   
  -apr_status_t apu_dbm_nextkey(apu_dbm_t *db, apu_datum_t *pkey)
  +apr_status_t apr_dbm_nextkey(apr_dbm_t *db, apu_datum_t *pkey)
   {
  -    *(real_datum_t *) pkey = APU_DBM_NEXTKEY(db->file, A2R_DATUM(*pkey));
  +    *(real_datum_t *) pkey = APR_DBM_NEXTKEY(db->file, A2R_DATUM(*pkey));
   
       /* store the error info into DB, and return a status code. Also, note
          that *pvalue should have been cleared on error. */
       return set_error(db);
   }
   
  -void apu_dbm_freedatum(apu_dbm_t *db, apu_datum_t data)
  +void apr_dbm_freedatum(apr_dbm_t *db, apu_datum_t data)
   {
  -    APU_DBM_FREEDATUM(db, data);
  +    APR_DBM_FREEDATUM(db, data);
   }
   
  -void apu_dbm_geterror(apu_dbm_t *db, int *errcode, const char **errmsg)
  +void apr_dbm_geterror(apr_dbm_t *db, int *errcode, const char **errmsg)
   {
       *errcode = db->errcode;
       *errmsg = db->errmsg;
  
  
  

Mime
View raw message