Subject: standards/21401: POSIX.2-1992: gl_pathc and gl_offs have wrong type
To: None <gnats-bugs@gnats.netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: netbsd-bugs
Date: 04/30/2003 13:11:35
>Number:         21401
>Category:       standards
>Synopsis:       POSIX.2-1992: gl_pathc and gl_offs have wrong type
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 30 12:12:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ben Harris
>Release:        2003-04-30
>Organization:
>Environment:
>Description:

IEEE Std 1003.2-1992, and its successors, require glob_t to have the
following members:

size_t	gl_pathc
char	**gl_pathv
size_t	gl_offs

In NetBSD's <glob.h>, though, gl_pathc and gl_offs are of type int, not
size_t.  This is significant on systems where size_t and int are different
sizes.

>How-To-Repeat:
Inspection of the definition of glob_t in <glob.h>.
Compare with
<http://www.opengroup.org/onlinepubs/007904975/basedefs/glob.h.html>

>Fix:
glob() will need versioning, again.


>Release-Note:
>Audit-Trail:
>Unformatted: