Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2005 12:20:04 GMT
From:      Hye-Shik Chang <perky@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/84219: ncurses.h wchar_t confliction
Message-ID:  <200507281220.j6SCK4Mw018598@freefall.freebsd.org>
Resent-Message-ID: <200507281220.j6SCKMPj018621@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84219
>Category:       misc
>Synopsis:       ncurses.h wchar_t confliction
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 28 12:20:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Hye-Shik Chang
>Release:        FreeBSD 7.0-CURRENT
>Organization:
Yonsei University
>Environment:
FreeBSD alice.liko.co.kr 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Sun Jul 17 09:46:00 KST 2005     root@alice.liko.co.kr:/usr/obj/usr/src/sys/NONDEBUG  i386

>Description:
When _XOPEN_SOURCE_EXTENDED is defined, ncurses.h conflicts
agains stdlib.h.  ncurses.h checks whether __wchar_t macro is defined,
but FreeBSD's __wchar_t isn't a macro but typedef.  So we need to
change the condition to defined(_WCHAR_T_DECLARED).


>How-To-Repeat:

try compile the following: (which is digested from Python aclocal.m4)

#define _XOPEN_SOURCE_EXTENDED 1
#include <stdlib.h>
#include <ncurses.h>


>Fix:

--- lib/libncurses/Makefile.orig	Thu Jul 28 17:57:12 2005
+++ lib/libncurses/Makefile	Thu Jul 28 17:56:29 2005
@@ -371,7 +371,7 @@
 	    -e "s%@cf_cv_type_of_bool@%${TYPE_OF_BOOL}%g" \
 	    -e "s%@cf_cv_typeof_chtype@%${TYPEOF_CHTYPE}%g" \
 	    -e "s%@cf_cv_widec_shift@%${WIDEC_SHIFT}%g" \
-	    -e "s/ _WCHAR_T/ __wchar_t/g" \
+	    -e "s/#ifndef _WCHAR_T/#ifndef _WCHAR_T_DECLARED/g" \
 	    -e "s/ _WINT_T/ __wint_t/g" \
 
 unctrl.h:	unctrl.h.in

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507281220.j6SCK4Mw018598>