mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Hopefully good fix for va_listval build fails (re: 41ed8047, etc.)
The last commit still failed to build on macOS M1. That va_listval macro keeps causing trouble. It's an AST thing that is defined in src/lib/libast/features/common. That looks like some incredibly opaque attempt to make it compatible with everything, and clearly it no longer works properly on all systems. I don't dare touch it, though. That code looks like any minimal change will probably break the build on some system or other. src/lib/libast/features/hack: - Add feature test to check if that macro needs (0) no workaround, or (1) the workaround from the 93v- beta, or (2) the FreeBSD one. Whichever version compiles first, it will use. If none does, this test will not output a value, which will be treated as 0. src/lib/libast/hash/hashalloc.c, src/lib/libast/string/tokscan.c: - Update to use the result of the hack feature test. src/lib/libast/Mamfile: - Update for new #include dependencies.
This commit is contained in:
parent
41ed8047d2
commit
153c4b56e8
4 changed files with 71 additions and 10 deletions
|
|
@ -31,6 +31,7 @@
|
|||
static const char id_hash[] = "\n@(#)$Id: hash (AT&T Research) 1996-08-11 $\0\n";
|
||||
|
||||
#include "hashlib.h"
|
||||
#include "FEATURE/hack"
|
||||
|
||||
Hash_info_t hash_info = { 0 };
|
||||
|
||||
|
|
@ -152,10 +153,13 @@ hashalloc(Hash_table_t* ref, ...)
|
|||
va_copy(*vp, ap);
|
||||
vp++;
|
||||
}
|
||||
#if __clang__ && __SIZEOF_POINTER__ == 4 && !__APPLE__
|
||||
#if _need_va_listval_workaround
|
||||
{
|
||||
# if _need_va_listval_workaround == 2
|
||||
va_listarg np;
|
||||
# else
|
||||
va_list np;
|
||||
|
||||
# endif
|
||||
np = va_listval(va_arg(ap, va_listarg));
|
||||
va_copy(ap, np);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue