another cpp fix

This commit is contained in:
danj 2006-05-15 21:28:29 +00:00
parent bd0e63aa7c
commit e1ed5d345a
2 changed files with 8 additions and 5 deletions

2
bdb.c
View file

@ -840,7 +840,7 @@ VALUE db_del(VALUE obj, VALUE vtxn, VALUE vkey, VALUE vflags)
return Qtrue; return Qtrue;
} }
t_dbh *dbassoc[OPEN_MAX]; t_dbh *dbassoc[LMAXFD];
VALUE VALUE
assoc_callback2(VALUE *args) assoc_callback2(VALUE *args)
{ {

11
bdb.h
View file

@ -9,11 +9,14 @@
#define NOTXN NULL #define NOTXN NULL
#if OPEN_MAX #ifdef OPEN_MAX
#define MAXFD OPEN_MAX #define LMAXFD OPEN_MAX
#elif FOPEN_MAX
#define MAXFD FOPEN_MAX
#else #else
#ifdef FOPEN_MAX
#define LMAXFD FOPEN_MAX
#endif
#endif
#ifndef LMAXFD
#error "No max fd define available." #error "No max fd define available."
#endif #endif