Le samedi 16 février 2013 21:17:32, Michael Matz a écrit :
> __STDC_HOSTED__  : not set (incorrectly, it should probably be set to 1
>                     given that tcc assumes a normal main() and that the
>                     rest of the provided facilities is provided by the C
>                     library not under tcc control)

So what do you think of the attached patch?

Best regards,

Thomas
From fe64a4d00512740b3cd3a8faa49ba7c908e86944 Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <[email protected]>
Date: Sun, 17 Feb 2013 19:44:55 +0100
Subject: [PATCH] Define __STDC_HOSTED__

Quoting Michael Matz on tinycc-devel:

"__STDC_HOSTED__  : not set (incorrectly, it should probably be set to 1
                    given that tcc assumes a normal main() and that the
                    rest of the provided facilities is provided by the C
                    library not under tcc control)"
---
 libtcc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libtcc.c b/libtcc.c
index 6b8f237..b138fd9 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -924,6 +924,7 @@ LIBTCCAPI TCCState *tcc_new(void)
     /* standard defines */
     tcc_define_symbol(s, "__STDC__", NULL);
     tcc_define_symbol(s, "__STDC_VERSION__", "199901L");
+    tcc_define_symbol(s, "__STDC_HOSTED__", NULL);
 
     /* target defines */
 #if defined(TCC_TARGET_I386)
-- 
1.7.10.4

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to