- Fix build on armv6
- While I'm here, fix diff header of patch file PR: 209457 Submitted by: <mikael.urankar@gmail.com> Obtained from: https://github.com/att/ast/blob/beta/src/lib/libast/hash/hashalloc.c https://github.com/att/ast/blob/beta/src/lib/libast/string/tokscan.c
This commit is contained in:
parent
70e551ad46
commit
22bf4d7140
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=424858
3 changed files with 29 additions and 31 deletions
|
@ -1,6 +1,6 @@
|
|||
--- src/lib/libast/features/wchar.orig 2012-01-12 15:40:22.000000000 +0800
|
||||
+++ src/lib/libast/features/wchar 2012-06-12 10:05:37.278869903 +0800
|
||||
@@ -51,6 +51,7 @@
|
||||
--- src/lib/libast/features/wchar.orig 2012-01-12 07:40:22 UTC
|
||||
+++ src/lib/libast/features/wchar
|
||||
@@ -51,6 +51,7 @@ endif
|
||||
run{
|
||||
cat <<!
|
||||
#if _hdr_wchar && defined(_nxt_wchar)
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
--- src/lib/libast/hash/hashalloc.c.orig 2013-12-28 22:09:43.000000000 +0100
|
||||
+++ src/lib/libast/hash/hashalloc.c 2013-12-28 22:43:14.000000000 +0100
|
||||
@@ -49,6 +49,7 @@
|
||||
va_list* vp = va;
|
||||
Hash_region_f region = 0;
|
||||
void* handle;
|
||||
+ va_listarg tmpval;
|
||||
|
||||
va_start(ap, ref);
|
||||
|
||||
@@ -151,7 +152,8 @@
|
||||
--- src/lib/libast/hash/hashalloc.c.orig 2006-11-07 22:29:04 UTC
|
||||
+++ src/lib/libast/hash/hashalloc.c
|
||||
@@ -151,7 +151,16 @@ hashalloc(Hash_table_t* ref, ...)
|
||||
va_copy(*vp, ap);
|
||||
vp++;
|
||||
}
|
||||
- va_copy(ap, va_listval(va_arg(ap, va_listarg)));
|
||||
+ tmpval = va_listval(va_arg(ap, va_listarg));
|
||||
+ va_copy(ap, tmpval);
|
||||
+#if __clang__ && __SIZEOF_POINTER__ == 4
|
||||
+ {
|
||||
+ va_list np;
|
||||
+
|
||||
+ np = va_listval(va_arg(ap, va_listarg));
|
||||
+ va_copy(ap, np);
|
||||
+ }
|
||||
+#else
|
||||
va_copy(ap, va_listval(va_arg(ap, va_listarg)));
|
||||
+#endif
|
||||
break;
|
||||
case 0:
|
||||
if (vp > va)
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
--- ./src/lib/libast/string/tokscan.c.orig 2013-12-28 22:16:20.000000000 +0100
|
||||
+++ ./src/lib/libast/string/tokscan.c 2013-12-28 22:43:28.000000000 +0100
|
||||
@@ -188,6 +188,7 @@
|
||||
char** p_string;
|
||||
char* prv_f = 0;
|
||||
va_list prv_ap;
|
||||
+ va_listarg tmpval;
|
||||
|
||||
va_start(ap, fmt);
|
||||
if (!*s || *s == '\n')
|
||||
@@ -233,7 +234,8 @@
|
||||
--- src/lib/libast/string/tokscan.c.orig 2006-11-07 22:29:31 UTC
|
||||
+++ src/lib/libast/string/tokscan.c
|
||||
@@ -233,7 +233,16 @@ tokscan(register char* s, char** nxt, co
|
||||
prv_f = f;
|
||||
f = va_arg(ap, char*);
|
||||
va_copy(prv_ap, ap);
|
||||
- va_copy(ap, va_listval(va_arg(ap, va_listarg)));
|
||||
+ tmpval = va_listval(va_arg(ap, va_listarg));
|
||||
+ va_copy(ap, tmpval);
|
||||
+#if __clang__ && __SIZEOF_POINTER__ == 4
|
||||
+ {
|
||||
+ va_list np;
|
||||
+
|
||||
+ np = va_listval(va_arg(ap, va_listarg));
|
||||
+ va_copy(ap, np);
|
||||
+ }
|
||||
+#else
|
||||
va_copy(ap, va_listval(va_arg(ap, va_listarg)));
|
||||
+#endif
|
||||
continue;
|
||||
case 'c':
|
||||
p_char = va_arg(ap, char*);
|
||||
|
|
Loading…
Reference in a new issue