lib/posix_wrap/errno.h: Add __set_errno() macro
commitcd63a2f8cd2c14748f4374abcd9a38705f2e7055
authorDaniel Kiper <daniel.kiper@oracle.com>
Tue, 15 Mar 2022 18:05:45 +0000 (15 14:05 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 21 Mar 2022 18:22:28 +0000 (21 19:22 +0100)
tree2211930accbaff8e60f76600aa0238fd839033e2
parentad9ccf660013c208077b1e983d6c824df25ed1cf
lib/posix_wrap/errno.h: Add __set_errno() macro

$ ./configure --target=x86_64-w64-mingw32 --with-platform=efi --host=x86_64-w64-mingw32
$ make

[...]

cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm -f moddep.lst; exit 1)
__imp__errno in regexp is not defined

This happens because grub-core/lib/gnulib/malloc/dynarray_resize.c and
grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c (both are used by
regexp module) from the latest Gnulib call __set_errno() which originally
sets errno variable (Windows builds add __imp__ prefix). Of course it is
not defined and grub_errno should be used instead.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/lib/posix_wrap/errno.h