1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00

Add support for XPG7 testing.

The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
This commit is contained in:
Ulrich Drepper
2010-01-09 10:56:41 -08:00
parent 44dcc00292
commit f095bb7204
115 changed files with 1240 additions and 388 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
/* Copyright (C) 1991-2006, 2007, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -216,7 +216,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
int errval = 0;
#ifndef COMPILE_WSCANF
__locale_t loc = _NL_CURRENT_LOCALE;
struct locale_data *const curctype = loc->__locales[LC_CTYPE];
struct __locale_data *const curctype = loc->__locales[LC_CTYPE];
#endif
/* Errno of last failed inchar call. */
@@ -294,7 +294,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
{
#ifndef COMPILE_WSCANF
struct locale_data *const curnumeric = loc->__locales[LC_NUMERIC];
struct __locale_data *const curnumeric = loc->__locales[LC_NUMERIC];
#endif
/* Figure out the decimal point character. */
@@ -1389,7 +1389,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
{
#ifdef COMPILE_WSCANF
wcdigits[n] = (const wchar_t *)
_NL_CURRENT (LC_CTYPE, _NL_CTYPE_INDIGITS0_WC + n);
_NL_CURRENT (LC_CTYPE, _NL_CTYPE_INDIGITS0_WC + n);
wchar_t *wc_extended = (wchar_t *)
alloca ((to_level + 2) * sizeof (wchar_t));
@@ -1399,7 +1399,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
wcdigits_extended[n] = wc_extended;
#else
mbdigits[n]
= curctype->values[_NL_CTYPE_INDIGITS0_MB + n].string;
= curctype->values[_NL_CTYPE_INDIGITS0_MB + n].string;
/* Get the equivalent wide char in map. */
wint_t extra_wcdigit = __towctrans (L'0' + n, map);
@@ -2047,9 +2047,9 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
wcdigits[11] = __towctrans (L'.', map);
/* If we have not read any character or have just read
locale decimal point which matches the decimal point
for localized FP numbers, then we may have localized
digits. Note, we test GOT_DOT above. */
locale decimal point which matches the decimal point
for localized FP numbers, then we may have localized
digits. Note, we test GOT_DOT above. */
#ifdef COMPILE_WSCANF
if (wpsize == 0 || (wpsize == 1 && wcdigits[11] == decimal))
#else
@@ -2086,7 +2086,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
bool have_locthousands = (flags & GROUP) != 0;
/* Now get the digits and the thousands-sep equivalents. */
for (int n = 0; n < 11; ++n)
for (int n = 0; n < 11; ++n)
{
if (n < 10)
wcdigits[n] = __towctrans (L'0' + n, map);
@@ -2385,7 +2385,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
if (wc <= runp[1] && not_in)
{
/* The current character is not in the
scanset. */
scanset. */
ungetc (c, s);
goto out;
}
@@ -2611,7 +2611,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
if (wc <= runp[1] && not_in)
{
/* The current character is not in the
scanset. */
scanset. */
ungetc (c, s);
goto out2;
}