Fixincludes - some analysis
gschafer at zip.com.au
Sat Jan 25 05:25:52 PST 2003
On Fri, Jan 24, 2003 at 07:30:38PM -0600, Bruce Dubbs wrote:
> Greg Schafer wrote:
> >curses.h ncusrses.h (from ncurses)
> >@@ -295,7 +304,9 @@
> >#ifndef _WCHAR_T
> >+#ifndef __cplusplus
> >typedef unsigned long wchar_t;
> >#endif /* _WCHAR_T */
> >#ifndef _WINT_T
> >typedef long int wint_t;
> >The intent of this one looks clear. Don't do the typedef if included in c++
> >code. I have no idea if this is good or bad. Again, 3.3 and 3.4 perform the
> >same fix. 2.95.4 doesn't do the fix at all.
> Just guessing here, but perhaps wchar_t is already defined if using c++.
Bruce, a reasonably good guess methinks :) During the fixincludes run it
Applying avoid_wchar_t_type to curses.h
The comment in the fixincludes code for "avoid_wchar_t_type" says:-
* For C++, avoid any typedef definition of wchar_t,
* and use the built in type instead.
The thread starting here also has some context:-
and another thread here looks interesting:-
But the questions remain:-
1) is it really needed?
2) does it make any difference to the affected headers?
Seems to me that even some of the gcc gurus don't understand the fixincludes
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev