* [PATCH] In C++ wchar_t is a keyword, so don't define it
2011-10-10 12:23 ` Szabolcs Nagy
@ 2011-10-10 10:33 ` Arvid Ephraim Picciani
2011-10-10 14:03 ` aep
1 sibling, 0 replies; 5+ messages in thread
From: Arvid Ephraim Picciani @ 2011-10-10 10:33 UTC (permalink / raw)
To: musl
---
arch/i386/bits/alltypes.h.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index 672d6a4..5aacc29 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -26,11 +26,13 @@ TYPEDEF __builtin_va_list va_list;
TYPEDEF struct __va_list * va_list;
#endif
+#ifndef __cplusplus
#ifdef __WCHAR_TYPE__
TYPEDEF __WCHAR_TYPE__ wchar_t;
#else
TYPEDEF long wchar_t;
#endif
+#endif
TYPEDEF long wint_t;
TYPEDEF long wctrans_t;
TYPEDEF long wctype_t;
--
1.7.7
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] In C++ wchar_t is a keyword, so don't define it
@ 2011-10-10 10:33 Arvid Picciani
2011-10-10 12:23 ` Szabolcs Nagy
0 siblings, 1 reply; 5+ messages in thread
From: Arvid Picciani @ 2011-10-10 10:33 UTC (permalink / raw)
To: musl
---
arch/i386/bits/alltypes.h.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index 672d6a4..48d6efc 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -26,7 +26,7 @@ TYPEDEF __builtin_va_list va_list;
TYPEDEF struct __va_list * va_list;
#endif
-#ifdef __WCHAR_TYPE__
+#if defined(__WCHAR_TYPE__) && !defined(__cplusplus)
TYPEDEF __WCHAR_TYPE__ wchar_t;
#else
TYPEDEF long wchar_t;
--
1.7.7
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] In C++ wchar_t is a keyword, so don't define it
2011-10-10 10:33 [PATCH] In C++ wchar_t is a keyword, so don't define it Arvid Picciani
@ 2011-10-10 12:23 ` Szabolcs Nagy
2011-10-10 10:33 ` Arvid Ephraim Picciani
2011-10-10 14:03 ` aep
0 siblings, 2 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2011-10-10 12:23 UTC (permalink / raw)
To: musl
* Arvid Picciani <aep@exys.org> [2011-10-10 12:33:20 +0200]:
> -#ifdef __WCHAR_TYPE__
> +#if defined(__WCHAR_TYPE__) && !defined(__cplusplus)
> TYPEDEF __WCHAR_TYPE__ wchar_t;
> #else
> TYPEDEF long wchar_t;
imho you meant
#ifndef __cplusplus
#ifdef __WCHAR_TYPE__
TYPEDEF __WCHAR_TYPE__ wchar_t;
#else
TYPEDEF long wchar_t;
#endif
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] In C++ wchar_t is a keyword, so don't define it
2011-10-10 12:23 ` Szabolcs Nagy
2011-10-10 10:33 ` Arvid Ephraim Picciani
@ 2011-10-10 14:03 ` aep
2011-10-10 14:50 ` aep
1 sibling, 1 reply; 5+ messages in thread
From: aep @ 2011-10-10 14:03 UTC (permalink / raw)
To: musl
On Mon, 10 Oct 2011 14:23:12 +0200, Szabolcs Nagy wrote:
> * Arvid Picciani <aep@exys.org> [2011-10-10 12:33:20 +0200]:
>> -#ifdef __WCHAR_TYPE__
>> +#if defined(__WCHAR_TYPE__) && !defined(__cplusplus)
>> TYPEDEF __WCHAR_TYPE__ wchar_t;
>> #else
>> TYPEDEF long wchar_t;
>
> imho you meant
>
> #ifndef __cplusplus
> #ifdef __WCHAR_TYPE__
> TYPEDEF __WCHAR_TYPE__ wchar_t;
> #else
> TYPEDEF long wchar_t;
> #endif
> #endif
should work either way. I don't really care :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] In C++ wchar_t is a keyword, so don't define it
2011-10-10 14:03 ` aep
@ 2011-10-10 14:50 ` aep
0 siblings, 0 replies; 5+ messages in thread
From: aep @ 2011-10-10 14:50 UTC (permalink / raw)
To: musl
>> imho you meant
>>
>> #ifndef __cplusplus
>> #ifdef __WCHAR_TYPE__
>> TYPEDEF __WCHAR_TYPE__ wchar_t;
>> #else
>> TYPEDEF long wchar_t;
>> #endif
>> #endif
no you are correct. My version only worked by random chance.
Yours is correct.
git send-mail fails me again though, so i can't resubmit right now.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-10 14:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 10:33 [PATCH] In C++ wchar_t is a keyword, so don't define it Arvid Picciani
2011-10-10 12:23 ` Szabolcs Nagy
2011-10-10 10:33 ` Arvid Ephraim Picciani
2011-10-10 14:03 ` aep
2011-10-10 14:50 ` aep
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).