[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems compiling zmailer under SunOS 4.1.1
| > Also, zmailer should be fixed *not* to use the private internal function
| > dbm_pagfno() call so that it will be portable to 4.4bsd.
|
| There I ask your suggestions, as the use it has is to be able to
| detect, when the NDBM file has changed, and act sensibly
| (Every lookup is preceded with a fstat() query, and comparison
| of file vitals - st_mtime, and st_nlink)
Knowing the file descriptor is necessary for both fstat and flock, as the
comment in the 4.3BSD ndbm.h indicates. 4.4 BSD db has a fd() method which
is intended for fcntl/flock (but the dbopen(3) manual shies away from
promising that it's adequate for fstat()), and the 4.4 ndbm emulation could
probably implement dbm_pagfno with the following changes to ndbm.h
(untested, but I *think* they should work:-)
< #define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
> #define dbm_pagfno(a) ((a)->fd(a))
> #define dbm_dirfno(a) ((a)->fd(a))
Mark.