httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <v.j.orlikow...@gte.net>
Subject [PATCH-1.3] RedHat, mod_rewrite, and dbm
Date Fri, 09 Mar 2001 22:05:27 GMT
Running into some problems with Suse 7.1 beta, I came across an ugly
hack in mod_rewrite to take care of the care and feeding of RedHat
7.0. Basically, we hard-wire the location of ndbm.h based on glibc
version. Unfortunately, the location (/usr/include/db1/) is not used
by all distributions (i.e. Suse, who likes it in /usr/include/) which
include glibc 2.1 and above. This patch fixes the problem, but rather
suboptimally in my opinion - I'm entirely open to other solutions.
However, I'd like to commit the patch by tomorrow morning. Unless
someone objects strongly, or comes up with a better way to test, this
will go in then, perhaps to be replaced with something more workable
later.

Index: src/helpers/find-dbm-lib
===================================================================
RCS file: /home/cvs/apache-1.3/src/helpers/find-dbm-lib,v
retrieving revision 1.10
diff -u -d -r1.10 find-dbm-lib
--- src/helpers/find-dbm-lib	2000/12/12 23:24:03	1.10
+++ src/helpers/find-dbm-lib	2001/03/09 21:56:47
@@ -17,6 +17,10 @@
 		    DBM_LIB="-ldbm"
 		elif ./helpers/TestCompile lib ndbm dbm_open; then
 		    DBM_LIB="-lndbm"
+		    if ./helpers/TestCompile lib db1 dbm_open; then
+			# Red Hat needs this; ndbm.h lives in db1
+			CFLAGS="$CFLAGS -I/usr/include/db1"
+		    fi
 		elif ./helpers/TestCompile lib db1 dbm_open; then
 		    # For Red Hat 7
 		    DBM_LIB="-ldb1"
Index: src/modules/standard/mod_rewrite.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.h,v
retrieving revision 1.78
diff -u -d -r1.78 mod_rewrite.h
--- src/modules/standard/mod_rewrite.h	2001/01/18 22:31:44	1.78
+++ src/modules/standard/mod_rewrite.h	2001/03/09 21:56:49
@@ -130,12 +130,7 @@
      * so we also need to know the file extension
      */
 #ifndef NO_DBM_REWRITEMAP
-#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
-    && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
-#include <db1/ndbm.h>
-#else
 #include <ndbm.h>
-#endif
 #if defined(DBM_SUFFIX)
 #define NDBM_FILE_SUFFIX DBM_SUFFIX
 #elif defined(__FreeBSD__) || (defined(DB_LOCK) && defined(DB_SHMEM))


Victor
-- 
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
orlikowski@apache.org
vjo@us.ibm.com


Mime
View raw message