must ndbm.h be present ?
Erik Bertelsen
erik at mediator.uni-c.dk
Tue Apr 18 11:58:53 UTC 2000
When configuring and building inn-BETA-2000041[68] on
SunOS mmm.uni-c.dk 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-2
I get compilation errors from authprogs/ckpasswd.c because datum
is not declared.
In the top of the file we find:
#ifdef HAVE_NDBM_H
# include <ndbm.h>
#else
# ifdef HAVE_DB1_NDBM_H
# include <db1/ndbm.h>
# endif
#endif
which includes ndbm.h if found, but may include nothing.
Lateron the dbm functions are used unconditionally, which causes the above
mentioned compilation error.
The following (incomplete) patch allows the build to complete:
*** inn-BETA-20000416/authprogs/ckpasswd.c Sat Nov 20 22:52:29 1999
--- inn-BETA-20000418/authprogs/ckpasswd.c Tue Apr 18 13:36:25 2000
***************
*** 79,84 ****
--- 79,85 ----
return(pass);
}
+ #if defined(HAVE_NDBM_H) || defined(HAVE_DB1_NDBM_H)
char *GetDBPass(char *name, char *file)
{
datum key;
***************
*** 101,106 ****
--- 102,108 ----
dbm_close(D);
return(pass);
}
+ #endif
int main(int argc, char *argv[])
{
***************
*** 170,178 ****
--- 172,182 ----
if (do_file)
rpass = GetFilePass(uname, fname);
else
+ #if defined(HAVE_NDBM_H) || defined(HAVE_DB1_NDBM_H)
if (do_db)
rpass = GetDBPass(uname, fname);
else
+ #endif
rpass = GetPass(uname);
if (!rpass) {
My question really is: Must the dbm library and header(s) be present for
INN to build and run? If yes, then configure should probably abort unless
a suitable ndbm.h is located. If no, then something along with the above
patch should be considered (plus the handling of commandline options, at
least -d).
best regards
Erik Bertelsen
UNI-C.
More information about the inn-workers
mailing list