apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@ebuilt.com>
Subject Re: fails to compile dbm
Date Fri, 18 Jan 2002 00:31:57 GMT
That seems to fix it. +1

....Roy


On Thu, Jan 17, 2002 at 04:15:19PM -0800, Greg Stein wrote:
> Urk... that is my fault. The DB_NOTFOUND is not in db1, which is apparently
> what you're including/linking against.  Please try this patch:
> 
> Index: apr_dbm_berkeleydb.c
> ===================================================================
> RCS file: /home/cvs/apr-util/dbm/apr_dbm_berkeleydb.c,v
> retrieving revision 1.13
> diff -u -r1.13 apr_dbm_berkeleydb.c
> --- apr_dbm_berkeleydb.c	16 Jan 2002 08:56:22 -0000	1.13
> +++ apr_dbm_berkeleydb.c	18 Jan 2002 00:07:04 -0000
> @@ -250,7 +250,13 @@
>      dberr = do_fetch(GET_BDB(dbm->file), ckey, rd);
>  
>      /* "not found" is not an error. return zero'd value. */
> -    if (dberr == DB_NOTFOUND) {
> +    if (dberr ==
> +#if DB_VER == 1
> +        RET_SPECIAL
> +#else
> +        DB_NOTFOUND
> +#endif
> +        ) {
>          memset(&rd, 0, sizeof(rd));
>          dberr = 0;
>      }
> 
> 
> I've also attached it.
> 
> Cheers,
> -g
> 
> On Thu, Jan 17, 2002 at 03:42:38PM -0800, Roy T. Fielding wrote:
> > The build on Linux is broken at
> > 
> > make[4]: Entering directory `/home/fielding/ws/httpd-2.0/srclib/apr-util/dbm'
> > /bin/sh /home/fielding/ws/httpd-2.0/srclib/apr/libtool --silent --mode=compile gcc
-g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread -Werror
 -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
 -I/home/fielding/ws/httpd-2.0/srclib/apr-util/include -I/home/fielding/ws/httpd-2.0/srclib/apr-util/include/private
-I/home/fielding/ws/httpd-2.0/srclib/apr-util/include -I/home/fielding/ws/httpd-2.0/srclib/apr-util/include/private
-I/home/fielding/ws/httpd-2.0/srclib/apr/include  -c apr_dbm_berkeleydb.c && touch
apr_dbm_berkeleydb.lo
> > apr_dbm_berkeleydb.c: In function `vt_db_fetch':
> > apr_dbm_berkeleydb.c:253: `DB_NOTFOUND' undeclared (first use in this function)
> > apr_dbm_berkeleydb.c:253: (Each undeclared identifier is reported only once
> > apr_dbm_berkeleydb.c:253: for each function it appears in.)
> > make[4]: *** [apr_dbm_berkeleydb.lo] Error 1
> > make[4]: Leaving directory `/home/fielding/ws/httpd-2.0/srclib/apr-util/dbm'
> > 
> > fielding@waka% uname -a
> > Linux waka.ebuilt.net 2.2.16-22 #1 Tue Aug 22 16:16:55 EDT 2000 i586 unknown
> > 
> > fielding@waka% more ./config.nice 
> > #! /bin/sh
> > #
> > # Created by configure
> > 
> > NOTEST_CFLAGS="-Werror"; export NOTEST_CFLAGS
> > "./configure" \
> > "--enable-maintainer-mode" \
> > "--prefix=/home/fielding/ws/test" \
> > "--enable-modules=most" \
> > "$@"
> > 
> > I think it is because this check in config.log works:
> > 
> > configure:3100: gcc -c -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
-pthread -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -DAP_DEBUG
-I/usr/include/db1 conftest.c 1>&5
> > 
> > but the  -I/usr/include/db1  is not being saved for later use.
> > 
> > ....Roy
> 
> -- 
> Greg Stein, http://www.lyra.org/
> 

> Index: apr_dbm_berkeleydb.c
> ===================================================================
> RCS file: /home/cvs/apr-util/dbm/apr_dbm_berkeleydb.c,v
> retrieving revision 1.13
> diff -u -r1.13 apr_dbm_berkeleydb.c
> --- apr_dbm_berkeleydb.c	16 Jan 2002 08:56:22 -0000	1.13
> +++ apr_dbm_berkeleydb.c	18 Jan 2002 00:07:04 -0000
> @@ -250,7 +250,13 @@
>      dberr = do_fetch(GET_BDB(dbm->file), ckey, rd);
>  
>      /* "not found" is not an error. return zero'd value. */
> -    if (dberr == DB_NOTFOUND) {
> +    if (dberr ==
> +#if DB_VER == 1
> +        RET_SPECIAL
> +#else
> +        DB_NOTFOUND
> +#endif
> +        ) {
>          memset(&rd, 0, sizeof(rd));
>          dberr = 0;
>      }


Mime
View raw message