httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Wunderlich <fwunderl...@devbrain.de>
Subject Re: [PATCH] fix mod_auth_dbm on Red Hat 7 (fwd)
Date Mon, 18 Dec 2000 15:04:56 GMT
About glibc-2.2 and dbm support:

I don't use Red Hat, so I don't know why they have /usr/include/db1 and
where this points to, but as glibc-2.2 does not have ndbm.h and db
support any more, a patch that would probably fix this issue for ALL
distributions and anyone would be:


diff -ur apache_1.3.14/src/modules/standard/mod_auth_dbm.c
apache_1.3.14-new/src/modules/standard/mod_auth_dbm.c
--- apache_1.3.14/src/modules/standard/mod_auth_dbm.c	Thu Sep 21
15:19:33 2000
+++ apache_1.3.14-new/src/modules/standard/mod_auth_dbm.c	Mon Dec 18
15:53:53 2000
@@ -80,7 +80,7 @@
 #define dbm_fetch sdbm_fetch
 #define dbm_close sdbm_close
 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
-    && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+    && __GLIBC__ >= 2 && __GLIBC_MINOR__ == 1
 #include <db1/ndbm.h>
 #else
 #include <ndbm.h>


I don't know why you have to patch find-dbm-lib; you simply have to use
gdbm or some other db package and if this has ndbm.h in the search path,
there should be no problem.

I am not subscribed. Please CC.

Original mail, copied verbatim from the mailing list, follows:

Applied. This will be in 1.3.15.

Cheers,
-g

On Tue, Dec 12, 2000 at 11:02:31PM +0000, Joe Orton wrote:
> Any chance of this being fixed for 1.3.15?
> 
> ---------- Forwarded message ----------
> Date: Wed, 11 Oct 2000 18:06:07 +0100 (BST)
> From: Joe Orton <jorton@redhat.com>
> Reply-To: new-httpd@apache.org
> To: new-httpd@apache.org
> Cc: nalin@redhat.com
> Subject: [PATCH] fix mod_auth_dbm on Red Hat 7
> 
> The mod_auth_dbm.c workaround for glibc 2.1 systems fails on Red Hat 7,
> which is based on a beta glibc 2.2, and has headers and libraries in
> different places.
> 
> The patch below fixes it... Ralf mentioned in the 1.46 commit for
> mod_auth_dbm.c that adding -I/usr/include/db1 is not correct: agreed, but
> this is better than nothing. (It is now a required change, since in RH7
> there is no /usr/include/db.h, and /usr/include/db1/ndbm.h has a #include
> <db.h>, so requiring /usr/include/db1 to be in the include path. If that
> makes sense.)
> 
> Index: find-dbm-lib
> ===================================================================
> RCS file: /home/cvspublic/apache-1.3/src/helpers/find-dbm-lib,v
> retrieving revision 1.9
> diff -u -r1.9 find-dbm-lib
> --- find-dbm-lib      1999/08/10 12:15:53     1.9
> +++ find-dbm-lib      2000/10/11 16:37:30
> @@ -17,6 +17,10 @@
>                   DBM_LIB="-ldbm"
>               elif ./helpers/TestCompile lib ndbm dbm_open; then
>                   DBM_LIB="-lndbm"
> +             elif ./helpers/TestCompile lib db1 dbm_open; then
> +                 # For Red Hat 7
> +                 DBM_LIB="-ldb1"
> +                 CFLAGS="$CFLAGS -I/usr/include/db1"
>               fi
>               if [ "x$DBM_LIB" != "x" ]; then
>                   LIBS="$LIBS $DBM_LIB"
> 
> 
> -- 
> Joe Orton, Red Hat Europe
>

Mime
View raw message