[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [PATCH] Adjust va_list to work with musl
From: |
Steffen Nurpmeso |
Subject: |
Re: [Tinycc-devel] [PATCH] Adjust va_list to work with musl |
Date: |
Sat, 30 Sep 2017 00:32:27 +0200 |
User-agent: |
s-nail v14.9.4 |
i wrote:
|---
| include/stdarg.h | 12 +++++++-----
| libtcc.c | 2 +-
| 2 files changed, 8 insertions(+), 6 deletions(-)
|
|diff --git a/include/stdarg.h b/include/stdarg.h
|index 9adfc61..e347763 100644
|--- a/include/stdarg.h
|+++ b/include/stdarg.h
|@@ -18,17 +18,19 @@ typedef struct {
|
| /* Avoid conflicting definition for va_list on musl libc */
| #ifndef __DEFINED_va_list
|-typedef __va_list_struct va_list[1];
|+typedef struct{char pad[32];} va_list;
Damn, that does not work out when passed to a function which
expects va_list! Such a c..p that you cannot "typedef char[32]
va_list" due to C restrictions, but must say "typedef char
va_list[32]", and that of course cannot be injected via #define.
Will try again tomorrow.
Ciao.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)