mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-28 05:21:13 +00:00
c3ec097256
Continuing the consolidation on Python for various miscellaneous build and test scripts, this patch moves conformtest from Perl to Python. The substance of the tests run is intended to be the same as before, except that the previous test for tags did not actually achieve the intended purpose of verifying whether a tag was already declared, so is changed to one that would actually fail for a tag that wasn't declared, and a typo in the old test for variables being available ($xyzzy instead of xyzzy) would have made that test not use the correct type (but it would have passed anyway with warnings). No attempt is made to keep the details of what the test output looks like; instead, tests are given names which are made to follow PASS: / FAIL: / XFAIL: / SKIP: / MISSING: as appropriate. In the new version, there is more consistent parsing of test lines (into a series of words, either surrounded by {} or separated by spaces) that applies for all kinds of test lines, rather than the old approach of different regular expressions for every kind of test. A few of the conform/data/ files are adjusted so their syntax works with the new script (which now requires spaces in certain cases where the old script tolerated them being missing, and does not allow stray semicolons at the end of "function" lines). Similarly, common logic is used around what happens with a second subtest if a first one fails (e.g., a test for a symbol's type if the test for availability fails), rather than such logic being replicated separately for each kind of test. Common parsing also applies for test lines both when they are lines for the header under test and when they are lines for another header specified with allow-header, again unlike the old script. Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py: New file. * conform/conformtest.pl: Remove. * conform/GlibcConform.pm: Likewise. * conform/glibcconform.py (KEYWORDS_C90): New constant. (KEYWORDS_C99): Likewise. (KEYWORDS): Likewise. * conform/Makefile ($(conformtest-header-tests)): Use conformtest.py instead of conformtest.pl. Do not pass --tmpdir option. Use --header instead of --headers. * conform/data/arpa/inet.h-data: Remove trailing semicolons on function entries. * conform/data/spawn.h-data: Likewise. * conform/data/fcntl.h-data (openat): Add space after function name. * conform/data/wchar.h-data (wcscasecmp): Likewise. (wcscasecmp_l): Likewise. * conform/data/termios.h-data (c_cc): Add space after element name.
170 lines
6.3 KiB
Plaintext
170 lines
6.3 KiB
Plaintext
#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
|
|
type wchar_t
|
|
type wint_t
|
|
# if !defined ISO99 && !defined ISO11 && !defined POSIX2008
|
|
type wctype_t
|
|
# endif
|
|
type mbstate_t
|
|
# if !defined ISO99 && !defined ISO11
|
|
type FILE
|
|
# else
|
|
# define FILE __FILE
|
|
# endif
|
|
type size_t
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
type locale_t
|
|
# endif
|
|
tag {struct tm}
|
|
|
|
function wint_t btowc (int)
|
|
function int fwprintf (FILE*, const wchar_t*, ...)
|
|
function int fwscanf (FILE*, const wchar_t*, ...)
|
|
# if !defined ISO99 && !defined ISO11 && !defined POSIX2008
|
|
function int iswalnum (wint_t)
|
|
function int iswalpha (wint_t)
|
|
function int iswcntrl (wint_t)
|
|
function int iswdigit (wint_t)
|
|
function int iswgraph (wint_t)
|
|
function int iswlower (wint_t)
|
|
function int iswprint (wint_t)
|
|
function int iswpunct (wint_t)
|
|
function int iswspace (wint_t)
|
|
function int iswupper (wint_t)
|
|
function int iswxdigit (wint_t)
|
|
function int iswctype (wint_t, wctype_t)
|
|
# endif
|
|
function wint_t fgetwc (FILE*)
|
|
function {wchar_t*} fgetws (wchar_t*, int, FILE*)
|
|
function wint_t fputwc (wchar_t, FILE*)
|
|
function int fputws (const wchar_t*, FILE*)
|
|
function int fwide (FILE*, int)
|
|
function wint_t getwc (FILE*)
|
|
function wint_t getwchar (void)
|
|
function int mbsinit (const mbstate_t*)
|
|
function size_t mbrlen (const char*, size_t, mbstate_t*)
|
|
function size_t mbrtowc (wchar_t*, const char*, size_t, mbstate_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function size_t mbsnrtowcs (wchar_t*, const char**, size_t, size_t, mbstate_t*)
|
|
# endif
|
|
function size_t mbsrtowcs (wchar_t*, const char**, size_t, mbstate_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function {FILE*} open_wmemstream (wchar_t**, size_t*)
|
|
# endif
|
|
function wint_t putwc (wchar_t, FILE*)
|
|
function wint_t putwchar (wchar_t)
|
|
function int swprintf (wchar_t*, size_t, const wchar_t*, ...)
|
|
function int swscanf (const wchar_t*, const wchar_t*, ...)
|
|
# if !defined ISO99 && !defined ISO11 && !defined POSIX2008
|
|
function wint_t towlower (wint_t)
|
|
function wint_t towupper (wint_t)
|
|
# endif
|
|
function wint_t ungetwc (wint_t, FILE*)
|
|
function int vfwprintf (FILE*, const wchar_t*, __gnuc_va_list)
|
|
# ifndef UNIX98
|
|
function int vfwscanf (FILE*, const wchar_t*, __gnuc_va_list)
|
|
# endif
|
|
function int vwprintf (const wchar_t*, __gnuc_va_list)
|
|
# ifndef UNIX98
|
|
function int vwscanf (const wchar_t*, __gnuc_va_list)
|
|
# endif
|
|
function int vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
|
|
# ifndef UNIX98
|
|
function int vswscanf (const wchar_t*, const wchar_t*, __gnuc_va_list)
|
|
# endif
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function {wchar_t*} wcpcpy (wchar_t*, const wchar_t*)
|
|
function {wchar_t*} wcpncpy (wchar_t*, const wchar_t*, size_t)
|
|
# endif
|
|
function size_t wcrtomb (char*, wchar_t, mbstate_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function int wcscasecmp (const wchar_t*, const wchar_t*)
|
|
function int wcscasecmp_l (const wchar_t*, const wchar_t*, locale_t)
|
|
# endif
|
|
function {wchar_t*} wcscat (wchar_t*, const wchar_t*)
|
|
function {wchar_t*} wcschr (const wchar_t*, wchar_t)
|
|
function int wcscmp (const wchar_t*, const wchar_t*)
|
|
function int wcscoll (const wchar_t*, const wchar_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function int wcscoll_l (const wchar_t*, const wchar_t*, locale_t)
|
|
# endif
|
|
function {wchar_t*} wcscpy (wchar_t*, const wchar_t*)
|
|
function size_t wcscspn (const wchar_t*, const wchar_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function {wchar_t*} wcsdup (const wchar_t*)
|
|
# endif
|
|
function size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*)
|
|
function size_t wcslen (const wchar_t*)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function int wcsncasecmp (const wchar_t*, const wchar_t*, size_t)
|
|
function int wcsncasecmp_l (const wchar_t*, const wchar_t*, size_t, locale_t)
|
|
# endif
|
|
function {wchar_t*} wcsncat (wchar_t*, const wchar_t*, size_t)
|
|
function int wcsncmp (const wchar_t*, const wchar_t*, size_t)
|
|
function {wchar_t*} wcsncpy (wchar_t*, const wchar_t*, size_t)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function size_t wcsnlen (const wchar_t*, size_t)
|
|
function size_t wcsnrtombs (char*, const wchar_t**, size_t, size_t, mbstate_t*)
|
|
# endif
|
|
function {wchar_t*} wcspbrk (const wchar_t*, const wchar_t*)
|
|
function {wchar_t*} wcsrchr (const wchar_t*, wchar_t)
|
|
function size_t wcsrtombs (char*, const wchar_t**, size_t, mbstate_t*)
|
|
function size_t wcsspn (const wchar_t*, const wchar_t*)
|
|
function {wchar_t*} wcsstr (const wchar_t*, const wchar_t*)
|
|
function double wcstod (const wchar_t*, wchar_t**)
|
|
# ifndef UNIX98
|
|
function float wcstof (const wchar_t*, wchar_t**)
|
|
function {long double} wcstold (const wchar_t*, wchar_t**)
|
|
# endif
|
|
function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**)
|
|
function {long int} wcstol (const wchar_t*, wchar_t**, int)
|
|
# ifndef UNIX98
|
|
function {long long int} wcstoll (const wchar_t*, wchar_t**, int)
|
|
# endif
|
|
function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int)
|
|
# ifndef UNIX98
|
|
function {unsigned long long int} wcstoull (const wchar_t*, wchar_t**, int)
|
|
# endif
|
|
# if defined UNIX98 || defined XOPEN2K
|
|
function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*)
|
|
# endif
|
|
# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
|
|
function int wcswidth (const wchar_t*, size_t)
|
|
# endif
|
|
function size_t wcsxfrm (wchar_t*, const wchar_t*, size_t)
|
|
# if defined XOPEN2K8 || defined POSIX2008
|
|
function size_t wcsxfrm_l (wchar_t*, const wchar_t*, size_t, locale_t)
|
|
# endif
|
|
function int wctob (wint_t)
|
|
# if !defined ISO99 && !defined ISO11 && !defined POSIX2008
|
|
function wctype_t wctype (const char*)
|
|
function int wcwidth (wchar_t)
|
|
# endif
|
|
function {wchar_t*} wmemchr (const wchar_t*, wchar_t, size_t)
|
|
function int wmemcmp (const wchar_t*, const wchar_t*, size_t)
|
|
function {wchar_t*} wmemcpy (wchar_t*, const wchar_t*, size_t)
|
|
function {wchar_t*} wmemmove (wchar_t*, const wchar_t*, size_t)
|
|
function {wchar_t*} wmemset (wchar_t*, wchar_t, size_t)
|
|
function int wprintf (const wchar_t*, ...)
|
|
function int wscanf (const wchar_t*, ...)
|
|
|
|
macro-int-constant WCHAR_MIN {promoted:wchar_t}
|
|
macro-int-constant WCHAR_MAX {promoted:wchar_t} >= 127
|
|
macro-constant WEOF {wint_t}
|
|
macro-constant NULL == 0
|
|
|
|
#if !defined ISO && !defined ISO99 && !defined ISO11
|
|
allow-header ctype.h
|
|
allow-header stdio.h
|
|
allow-header stdarg.h
|
|
allow-header stdlib.h
|
|
allow-header string.h
|
|
allow-header stddef.h
|
|
allow-header time.h
|
|
#endif
|
|
|
|
allow wcs[abcdefghijklmnopqrstuvwxyz]*
|
|
#if !defined ISO && !defined ISO99 && !defined ISO11
|
|
allow *_t
|
|
#endif
|
|
#endif
|