]> Savannah Git Hosting - gnulib.git/commit
errno-tests: port to GNU/Hurd
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 7 Aug 2024 14:23:51 +0000 (07:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 7 Aug 2024 14:24:17 +0000 (07:24 -0700)
commit6665274371e232134b8273d70d99c59da21d716f
treea5b797d271b88dbb5dec8fef16e7e0fca31bb9fb
parent740913a35199bfe1d43ccdaf69cec6ed430ab388
errno-tests: port to GNU/Hurd

Test for errno distinctness dynamically rather than statically,
since the static test blows up the compiler on Hurd.
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00039.html
Also, test that errno values can all be used in #if,
and improve diagnostics.
* tests/test-errno.c: Include stdio.h, stdlib.h, string.h.
(USABLE_IN_IF): New macro.  Use it to check errno values in #if.
(ERRTAB): New macro.
(struct nameval): New type.
(errtab): New global variable.
(errtab_cmp): New function.
(main): Test for errno distinctness dynamically not statically.
Diagnose lack of distinctness better.
ChangeLog
tests/test-errno.c