[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#335171: glibc-doc: getsubopt() has different interface with #define _GNU_SOURCE



Package: glibc-doc
Version: 2.3.2.ds1-22
Severity: minor



-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11.6
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

-- no debconf information
When compiling with #define _GNU_SOURCE function getsubopt() seems to be
defined as
int getsubopt (char **optionp, char* const *tokens, char **valuep)
and not as
int getsubopt (char **optionp, const char* const *tokens, char **valuep)

Proof:
Compile the example in section '25.3.13 Parsing of Suboptions Example'
with #define _GNU_SOURCE and you get a warning about 'incompatible
pointer typ in argument 2'.
Chance definition
const char *mount_opts[] =
into
char *mount_opts[] =
and the warning will disapear.
Should be mentioned in the documentation.

Werner



Reply to: