Bug in includes for 10.2.7?
Bug in includes for 10.2.7?
- Subject: Bug in includes for 10.2.7?
- From: Thomas Dibble <email@hidden>
- Date: Wed, 29 Oct 2003 13:26:19 -0800
In the stdlib.h file for the 10.2.7 stub libraries there is an apparent
bug.
ppc/ansi.h (included by machines/ansi.h which is included at the top of
stdlib.h) has:
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_
[...]
#define _BSD_CT_RUNE_T_ int /* arg type for ctype
funcs */
Meanwhile, stdlib.h has:
#ifndef _BSD_WCHAR_T_DEFINED_
#define _BSD_WCHAR_T_DEFINED_
typedef _BSD_WCHAR_T_ wchar_t;
#endif
Since _BSD_WCHAR_T_DEFINED_ is undefined and ppc/ansi.h has defined
"_BSD_WCHAR_T" to be int, this leads to:
typedef int wchar_t;
which is of course an error (warning):
Redeclaration of C++ built-in type "wchar_t"
coming out of gcc when this is built.
In fact, I created a brand new project, did nothing but #include
<stdlib.h> at the top of the main file, changed the two places to use
10.2.7 instead of the system includes, and got the same error.
Having used gcc 3.3 on Jaguar, I know this error message wasn't coming
out then.
Is this a bug?
I'm not using wchar at all, anywhere; should I be setting
"_BSD_WCHAR_T_DEFINED_"? If I do that then C-based libraries don't
compile (because "wchar_t" is undefined). Can I just define that for
C++ files but not C files? How?
---- Tom Dibble
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.