SunOS 4.1.* datastore_db.c Error

David Relson relson at osagesoftware.com
Mon Sep 20 00:56:10 CEST 2004


On Sun, 19 Sep 2004 15:28:44 -0700 (PDT)
Charles Hewson wrote:

> Dave & Matthias ....
> 
> Hi again,
> I decided to update this weekend as bogofilter has worked well the
> last 6 months. I ran into this issue with things from db.h not
> resolving. I can't recall how we worked around it last February with
> old datastore module. Your help would be appreciated.
> 
> Charles

Charles,

Without access to a SunOS 4.1.* system, I can't say for sure exactly
what to do.  My recollection is that the header files on SunOS need to
be processed in a particular order.  I found a file named
"patch.SunOS.0208" which shows changes made for you (and have attached a
copy).  Likely, you'll need to do some experimenting to see which parts
apply.

In your error messages, i.e.:

datastore_db.c:48: parse error before `*'
datastore_db.c:48: warning: type defaults to `int' in declaration of
`dbe'
datastore_db.c:48: warning: data definition has no type or storage class
datastore_db.c: In function `resolveflags':
datastore_db.c:80: `DB_CREATE' undeclared (first use in this function)
datastore_db.c:80: (Each undeclared identifier is reported only once
datastore_db.c:80: for each function it appears in.)
datastore_db.c:80: warning: left-hand operand of comma expression has no
effect
datastore_db.c:81: `DB_EXCL' undeclared (first use in this function)
datastore_db.c:81: warning: left-hand operand of comma expression has no
effect
datastore_db.c:82: `DB_NOMMAP' undeclared (first use in this function)
datastore_db.c:82: warning: left-hand operand of comma expression has no
effect
datastore_db.c:83: `DB_RDONLY' undeclared (first use in this function)

The 3 for line 48 indicate dbe isn't defined and those at 80-83 show a
bunch of #define symbols are missing.  It looks like db.h isn't being
processed correctly. 

Also, looking in patch.SunOS.0208 (at the changes to datastore.c), I see
some reordering of #include statements.  Try changing the order to this:

#include <unistd.h>		/* for SEEK_SET for SunOS 4.1.x */
#include <db.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <sys/resource.h>

Let me know if changing the order helps.

David

-- 
David Relson                   Osage Software Systems, Inc.
relson at osagesoftware.com       Ann Arbor, MI 48103
www.osagesoftware.com          tel:  734.821.8800
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.SunOS.0208
Type: application/octet-stream
Size: 1700 bytes
Desc: not available
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20040919/d890fd45/attachment.obj>


More information about the Bogofilter mailing list