vscanf defined incorrectly for non-GNU compilers in stdio.h when strict C99 or POSIX set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Hardy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is Ubuntu 8.04, libc6-dev 2.7-10ubuntu3.
The file /usr/include/
# if !defined __USE_GNU \
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
[snip]
# else
extern int __isoc99_vfscanf (FILE *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg) __wur;
extern int __isoc99_vscanf (__const char *__restrict __format,
_G_va_list __arg) __wur;
extern int __isoc99_vsscanf (__const char *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg) __THROW;
# define vfscanf __isoc99_vfscanf
# define vscanf __isoc99_vsscanf /* bad line */
# define vsscanf __isoc99_vsscanf
# endif
# endif
You can see both vscanf and vsscanf are defined to the same thing, and vscanf is wrong.
This affects non-GNU compilers where the user wants strict C99 or POSIX.
fixed in intrepid