Details

[Home]

Issue of the Standard # S0116

Brief

Inconsistency between types of fields ‘we_wordc’ and ‘we_offs’ in type ‘wordexp_t’ in LSB 3.1 and SUSv3

Detailed Description

Type ‘wordexp_t’ is defined in wordexp.h (13.4. Data Definitions for libc, 13.4.80. wordexp.h) as follows:

typedef struct {
    int we_wordc;
    char **we_wordv;
    int we_offs;
} wordexp_t;
So the fields ‘we_wordc’ and ‘we_offs’ are of type ‘int’.

However, SUSv3 states in the description of wordexp.h that the fields ‘we_wordc’ and ‘we_offs’ are of type ‘size_t’.

"The structure type wordexp_t shall contain at least the following members:
size_t    we_wordc - Count of words matched by words.
char    **we_wordv - Pointer to list of expanded words.
size_t    we_offs - Slots to reserve at the beginning of we_wordv."

Problem location(s) in the standard

Linux Standard Base Core Specification 3.1, Chapter 13. Base Libraries, 13.4. Data Definitions for libc, 13.4.80. wordexp.h.

Possible solutions

Replace ‘int’ by ‘size_t’ in the description of the fields ‘we_wordc’ and ‘we_offs’ of type ‘wordexp_t’.

Accepted

LSB Bugzilla, 1336

Status

Fixed in LSB 3.2

[Home]