Bug 18496

Summary: Possibly a problem between curses.h/runetype.h?
Product: Base System Reporter: chrisr <chrisr>
Component: gnuAssignee: Rong-En Fan <rafan>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   

Description chrisr 2000-05-11 12:40:01 UTC
In curses.h wchar is typedef's as follows:
#ifndef _WCHAR_T
typedef unsigned long wchar_t; 
#endif /* _WCHAR_T */

And in runetype.h:

#ifdef  _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_   wchar_t;
#undef  _BSD_WCHAR_T_
#endif

Fix: 

I've changed runetype.h to say:
#ifdef  _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_   wchar_t;
#define _WCHAR_T
#undef  _BSD_WCHAR_T_
#endif

Which fixes it for me. Is it a bug, or just me including too much?
How-To-Repeat: 
Including ctype.h and curses.h seems to cause compiling errors because wchar
gets redefined.
Comment 1 Rong-En Fan freebsd_committer freebsd_triage 2007-04-29 09:00:12 UTC
State Changed
From-To: open->closed

I believe this is fixed by recent ncurses update 
in 6.x which includes wide character support by default. 

If this is still a problem, let me know. 


Comment 2 Rong-En Fan freebsd_committer freebsd_triage 2007-04-29 09:00:12 UTC
Responsible Changed
From-To: freebsd-bugs->rafan

ncurses is my baby.