delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/19/18:03:15

From: jwilkins AT secnet DOT com ("Jonathan Wilkins")
Subject: gdbm 1.7.3 port
19 Dec 1996 18:03:15 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199612200216.TAA28380.cygnus.gnu-win32@silence.secnet.com>
Reply-To: jwilkins AT secnet DOT com
Mime-Version: 1.0
Comments: Authenticated sender is <jwilkins AT silence DOT secnet DOT com>
Original-To: gnu-win32 AT cygnus DOT com
X-mailer: Pegasus Mail for Win32 (v2.42a)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

alright.. here is a little more detail on the gdbm problem...

the code that seems to be broken is in bucket.c and relates to a 
read.. 

there is a code fragment as follows... 

num_bytes = read(dbf->desc, dbf->bucket, dbf->header->bucket_size);

num_bytes is an int, and read is supposed to return an int.. 
here's where it gets silly.. 

I add the line:
printf("num_bytes = %d\n\ndbf->desc = %d\ndbf->bucket = 
%p\ndbf-header->bucket_size = %d\n", num_bytes, dbf->desc,
 dbf->bucket, dbf->header->bucket_size); 

sorry it's a little ugly.. 

anyway, it outputs:

num_bytes = 88

dbf->desc = 3
dbf->bucket = 0x2eb5804
dbf->header->bucket_size = 1024

the next line of code is:
if (numbytes != dbf->header->bucket_size) _gdbm_fatal (dbf, "read 
error");

which ends the program...

if I comment out the _gdbm_fatal stuff it'll choke later on 
complaining that sync() is not implemented..

now, I am not sure if it's a problem with the gdbm code, or if it's a 
problem with the cygwin stuff.. I am pretty sure that the absence of 
the sync() function is not responsible as it usually doesn't get that 
far..

anyway, does anyone have any suggestion on what to look at next?

I seem to also remember a compiled version of the gdbm library 
(libgdbm.a) from beta 14... if anyone has that could they forward it 
to me?

                                                thanks
                                                     Jonathan
Jonathan Wilkins    | " If only they had used
jwilkins AT secnet DOT com |   for niceness
Secure Networks Inc |   instead of evil ... "
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019