httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [patch] Glibc 2.1 / DB 2.0 support
Date Sat, 12 Sep 1998 07:57:43 GMT
Sorry but this patch is broken.

*** apache-1.3.1/src/helpers/find-dbm-lib	Tue Apr 14 06:58:23 1998
--- apache-ppc/src/helpers/find-dbm-lib	Tue Sep  1 21:44:26 1998
***************
*** 13,19 ****
  	    *-linux*)
  		# many systems don't have -ldbm
  		DBM_LIB=""
! 		if ./helpers/TestCompile lib dbm dbm_open; then
  		    DBM_LIB="-ldbm"
  		elif ./helpers/TestCompile lib ndbm dbm_open; then
  		    DBM_LIB="-lndbm"
--- 13,22 ----
  	    *-linux*)
  		# many systems don't have -ldbm
  		DBM_LIB=""
! 		# if it's in libdb, use that one.
! 		if ./helpers/TestCompile lib db dbm_open; then
! 		    DBM_LIB="-ldb"
! 		elif ./helpers/TestCompile lib dbm dbm_open; then
  		    DBM_LIB="-ldbm"
  		elif ./helpers/TestCompile lib ndbm dbm_open; then
  		    DBM_LIB="-lndbm"


You've just screwed over everyone who has libdb installed, and who built
a previous version of apache... libdb always has dbm_open.  By testing
for it first you break binary compatibility with any existing dbm file.

diff -cNr apache-1.3.1/src/modules/standard/mod_auth_db.c apache-ppc/src/modules/standard/mod_auth_db.c
*** apache-1.3.1/src/modules/standard/mod_auth_db.c	Fri Jul  3 18:08:50 1998
--- apache-ppc/src/modules/standard/mod_auth_db.c	Mon Sep  7 18:37:03 1998
***************
*** 95,101 ****
--- 95,106 ----
  #include "http_core.h"
  #include "http_log.h"
  #include "http_protocol.h"
+ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ + __GLIBC__
>= 3)
+ #include <db_185.h>
+ #else
  #include <db.h>
+ #endif
+ 
  
  typedef struct {

No way.  I don't see any db_185.h on my glibc system.  (Redhat 5.1)

diff -cNr apache-1.3.1/src/modules/standard/mod_auth_dbm.c apache-ppc/src/modules/standard/mod_auth_dbm.c
*** apache-1.3.1/src/modules/standard/mod_auth_dbm.c	Fri Jul  3 18:08:50 1998
--- apache-ppc/src/modules/standard/mod_auth_dbm.c	Tue Sep  1 18:49:35 1998
***************
*** 74,80 ****
--- 74,85 ----
  #include "http_core.h"
  #include "http_log.h"
  #include "http_protocol.h"
+ #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__
>= 3)
+ #define DB_DBM_HSEARCH 1
+ #include <db.h>
+ #else
  #include <ndbm.h>
+ #endif
  
  /*
   * Module definition information - the part between the -START and -END

This should be completely unnecessary.  If you're building with libdb then
use mod_auth_db.  There's a reason that there are two modules that look
almost the same.

Dean

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message