summaryrefslogtreecommitdiff
path: root/modules/stddef-tests
Commit message (Collapse)AuthorAgeFilesLines
* alignasof: new modulePaul Eggert2023-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This splits off support for the C23 keywords alignas and alignof, from the now-deprecated stdalign module. The latter now merely provides C11 support. * MODULES.html.sh, NEWS, doc/gnulib.texi: * doc/posix-headers/stdalign.texi: Document the change. * lib/stdalign.in.h: Remove most of the definitions (which are now supplied by the alignasof module), leaving only __alignas_is_defined and __alignof_is_defined. * modules/alignasof, modules/alignasof-tests: New files. * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with most of the contents of the old gl_STDALIGN_H. Do not define __alignas_is_defined or __alignof_is_defined. (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work. * modules/alignalloc, modules/alignof, modules/argp: * modules/crypto/md4-buffer, modules/crypto/md5-buffer: * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer: * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer: * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/stddef-tests, modules/sys_socket: Depend on alignasof, not stdalign. * modules/stdalign: Deprecate. Depend on alignasof. * modules/stdalign-tests: Move most contents to the new module alignasof-tests, and depend on that.
* assert-h: prefer to ‘verify’Paul Eggert2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where it’s easy, prefer ‘static_assert’ to ‘verify’, as this simplifies the source by removing the need to include verify.h. Keep using ‘verify’ if verify.h is used for other reasons, or if code is shared with glibc. * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h: * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c: * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c: * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c: * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c: * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c: * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c: * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c: * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c: * tests/test-intprops.c, tests/test-libgmp.c: * tests/test-limits-h.c, tests/test-locale.c: * tests/test-pthread.c, tests/test-round2.c: * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c: * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c: * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c: * tests/test-wchar.c: Prefer static_assert to verify, and stop including verify.h. * lib/stat.c: Don’t include verify.h (this include was unnecessary). * modules/alignalloc, modules/alignof-tests, modules/argmatch: * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha: * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit: * modules/c32isgraph, modules/c32islower, modules/c32isprint: * modules/c32ispunct, modules/c32isspace, modules/c32isupper: * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs: * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf: * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map: * modules/intprops-tests, modules/libgmp-tests: * modules/limits-h-tests, modules/locale-tests, modules/malloca: * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit: * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep: * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests: * modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/round-tests, modules/roundf-tests, modules/sleep: * modules/stat, modules/stdalign-tests, modules/stdckdint-tests: * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests: * modules/strerror, modules/string-tests, modules/strtoimax: * modules/strtoumax, modules/sys_stat-tests, modules/time-tests: * modules/uchar-tests, modules/unistd-tests: * modules/unistdio/u16-u16-vasnprintf: * modules/unistdio/u16-vasnprintf: * modules/unistdio/u32-u32-vasnprintf: * modules/unistdio/u32-vasnprintf: * modules/unistdio/u8-u8-vasnprintf: * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf: * modules/utimecmp, modules/vasnprintf, modules/wchar-tests: Depend on assert-h, not verify.
* Add more C++ tests.Bruno Haible2019-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assert-h: Add C++ tests. * tests/test-assert-h-c++.cc: New file. * tests/test-assert-h-c++2.cc: New file. * modules/assert-h-c++-tests: New file. * modules/assert-h-tests: New file. ctype: Add C++ tests. * tests/test-ctype-c++.cc: New file. * tests/test-ctype-c++2.cc: New file. * modules/ctype-c++-tests: New file. * modules/ctype-tests (Depends-on): Add ctype-c++-tests. errno: Add C++ tests. * tests/test-errno-c++.cc: New file. * tests/test-errno-c++2.cc: New file. * modules/errno-c++-tests: New file. * modules/errno-tests (Depends-on): Add errno-c++-tests. float: Add C++ tests. * tests/test-float-c++.cc: New file. * tests/test-float-c++2.cc: New file. * modules/float-c++-tests: New file. * modules/float-tests (Depends-on): Add float-c++-tests. inttypes: Add more C++ tests. * tests/test-inttypes-c++2.cc: New file. * modules/inttypes-c++-tests (Files): Add it. (Makefile.am): Compile it. limits-h: Add C++ tests. * tests/test-limits-h-c++.cc: New file. * tests/test-limits-h-c++2.cc: New file. * modules/limits-h-c++-tests: New file. * modules/limits-h-tests (Depends-on): Add limits-h-c++-tests. stdarg: Add C++ tests. * tests/test-stdarg-c++.cc: New file. * tests/test-stdarg-c++2.cc: New file. * modules/stdarg-c++-tests: New file. * modules/stdarg-tests: New file. stdbool: Add C++ tests. * tests/test-stdbool-c++.cc: New file. * tests/test-stdbool-c++2.cc: New file. * modules/stdbool-c++-tests: New file. * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests. stddef: Add C++ tests. * tests/test-stddef-c++.cc: New file. * tests/test-stddef-c++2.cc: New file. * modules/stddef-c++-tests: New file. * modules/stddef-tests (Depends-on): Add stddef-c++-tests. stdint: Add C++ tests. * tests/test-stdint-c++.cc: New file. * tests/test-stdint-c++2.cc: New file. * modules/stdint-c++-tests: New file. * modules/stdint-tests (Depends-on): Add stdint-c++-tests. wchar: Add more C++ tests. * tests/test-wchar-c++2.cc: New file. * modules/wchar-c++-tests (Files): Add it. (Makefile.am): Compile it. wctype-h: Add more C++ tests. * tests/test-wctype-h-c++2.cc: New file. * modules/wctype-h-c++-tests (Files): Add it. (Makefile.am): Compile it.
* stddef: support C11's max_align_tPaul Eggert2014-12-121-0/+1
| | | | | | | | | | | | | * doc/posix-headers/stddef.texi (stddef.h): Document max_align_t. * lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]: Do not undef, as that might cause max_align_t to be defined twice. Instead, change use to check for _GL_STDDEF_WINT_T too. (max_align_t) [!HAVE_MAX_ALIGN_T]: New decl. * m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS): Check for max_align_t. * modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T. * modules/stddef-tests (Depends-on): Add stdalign. * tests/test-stddef.c: Test max_align_t.
* tests: remove License section from moduleEric Blake2009-12-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per modules/TEMPLATE-TESTS, test modules do not need a license section. This is because all tests are implicitly GPLv3+, with no conflict even in an LGPL or GPLv2 client, because the tests are not linked into the client executable. Delete the existing License sections with the following: find modules -name '*-tests' | xargs grep -l License \ | xargs sed -i '/^$/N; /License:/,$ d' * modules/arpa_inet-tests: Remove unneeded section. * modules/byteswap-tests: Likewise. * modules/ceilf-tests: Likewise. * modules/ceill-tests: Likewise. * modules/crypto/des-tests: Likewise. * modules/crypto/gc-arcfour-tests: Likewise. * modules/crypto/gc-arctwo-tests: Likewise. * modules/crypto/gc-des-tests: Likewise. * modules/crypto/gc-hmac-md5-tests: Likewise. * modules/crypto/gc-hmac-sha1-tests: Likewise. * modules/crypto/gc-md2-tests: Likewise. * modules/crypto/gc-md4-tests: Likewise. * modules/crypto/gc-md5-tests: Likewise. * modules/crypto/gc-pbkdf2-sha1-tests: Likewise. * modules/crypto/gc-rijndael-tests: Likewise. * modules/crypto/gc-sha1-tests: Likewise. * modules/crypto/gc-tests: Likewise. * modules/crypto/md2-tests: Likewise. * modules/crypto/md4-tests: Likewise. * modules/fcntl-h-tests: Likewise. * modules/floorf-tests: Likewise. * modules/floorl-tests: Likewise. * modules/frexp-nolibm-tests: Likewise. * modules/frexp-tests: Likewise. * modules/frexpl-nolibm-tests: Likewise. * modules/frexpl-tests: Likewise. * modules/getaddrinfo-tests: Likewise. * modules/inttypes-tests: Likewise. * modules/isfinite-tests: Likewise. * modules/isinf-tests: Likewise. * modules/ldexpl-tests: Likewise. * modules/locale-tests: Likewise. * modules/math-tests: Likewise. * modules/netdb-tests: Likewise. * modules/netinet_in-tests: Likewise. * modules/printf-frexp-tests: Likewise. * modules/printf-frexpl-tests: Likewise. * modules/priv-set-tests: Likewise. * modules/random_r-tests: Likewise. * modules/round-tests: Likewise. * modules/roundf-tests: Likewise. * modules/roundl-tests: Likewise. * modules/search-tests: Likewise. * modules/select-tests: Likewise. * modules/signal-tests: Likewise. * modules/stdbool-tests: Likewise. * modules/stddef-tests: Likewise. * modules/stdint-tests: Likewise. * modules/stdio-tests: Likewise. * modules/stdlib-tests: Likewise. * modules/string-tests: Likewise. * modules/strings-tests: Likewise. * modules/sys_select-tests: Likewise. * modules/sys_socket-tests: Likewise. * modules/sys_stat-tests: Likewise. * modules/sys_time-tests: Likewise. * modules/sys_utsname-tests: Likewise. * modules/sysexits-tests: Likewise. * modules/time-tests: Likewise. * modules/trunc-tests: Likewise. * modules/truncf-tests: Likewise. * modules/truncl-tests: Likewise. * modules/tsearch-tests: Likewise. * modules/unistd-tests: Likewise. * modules/wchar-tests: Likewise. * modules/wctype-tests: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* stddef: fix NetBSD 5.0 NULL bug, rather than working around itEric Blake2009-08-141-0/+14
* tests/test-locale.c: Revert previous patch related to NULL. * tests/test-stdio.c: Likewise. * tests/test-stdlib.c: Likewise. * tests/test-string.c: Likewise. * tests/test-unistd.c: Likewise. * modules/time-tests (Depends-on): Add verify. * modules/wchar-tests (Depends-on): Likewise. * tests/test-time.c: Test for NULL compliance. * tests/test-wchar.c: Likewise. * modules/locale (Depends-on): Add stddef. * modules/stdio (Depends-on): Likewise. * modules/stdlib (Depends-on): Likewise. * modules/string (Depends-on): Likewise. * modules/time (Depends-on): Likewise. * modules/unistd (Depends-on): Likewise. * modules/wchar (Depends-on): Likewise. * lib/locale.in.h (includes): Use <stddef.h> to fix NULL. * lib/stdlib.in.h (includes): Likewise. * lib/string.in.h (includes): Likewise. * lib/time.in.h (includes): Likewise. * lib/unistd.in.h (includes): Likewise. * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was replaced. * m4/wchar.m4 (gl_WCHAR_H): Likewise. * m4/stddef_h.m4: New file. * modules/stddef: Likewise. * lib/stddef.in.h: Likewise. * modules/stddef-tests: Likewise. * tests/test-stddef.c: Likewise. * MODULES.html.sh (Basic types <stddef.h>): Mention new module. * doc/posix-headers/stddef.texi (stddef.h): Document the bug. * doc/posix-headers/locale.texi (locale.h): Likewise. * doc/posix-headers/stdio.texi (stdio.h): Likewise. * doc/posix-headers/stdlib.texi (stdlib.h): Likewise. * doc/posix-headers/string.texi (string.h): Likewise. * doc/posix-headers/time.texi (time.h): Likewise. * doc/posix-headers/unistd.texi (unistd.h): Likewise. * doc/posix-headers/wchar.texi (wchar.h): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>