struct datum has wrong type
To: None <gnats-bugs@gnats.netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: netbsd-bugs
Date: 04/30/2003 13:30:04
>Number: 21402
>Category: standards
>Synopsis: XPG4.2: <ndbm.h> struct datum has wrong type
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: standards-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 30 12:31:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Ben Harris
>Release: 2003-04-30
>Organization:
>Environment:
>Description:
X/Open System Interfaces and Headers (XSH), Issue 4, Version 2, and its
successors, define struct datum in <ndbm.h> to contain:
void *dptr
size_t dsize
NetBSD's <ndbm.h>, though, makes dsize an int. This could be a problem on
systems where int and size_t are different sizes.
>How-To-Repeat:
Inspection of the definition of struct datum in <ndbm.h>, and comparison
with <http://www.opengroup.org/onlinepubs/007904975/basedefs/ndbm.h.html>.
>Fix:
dbm_delete(), dbm_fetch(), and dbm_store() will need to be versioned.
>Release-Note:
>Audit-Trail:
>Unformatted: