*BSD News Article 60425


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!hermes.oc.com!news.unt.edu!cs.utexas.edu!news.sprintlink.net!usenet.kornet.nm.kr!xpat.postech.ac.kr!news.kreonet.re.kr!usenet.seri.re.kr!news.imnet.ad.jp!wnoc-tyo-news!waseda.ac.jp!cfi.waseda!wsdnws!ytsuji
From: ytsuji@cfi.waseda.ac.jp (Dr Yoshimasa Tsuji)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: conflicting types for `wchar_t'
Date: 30 Jan 1996 23:11:36 GMT
Organization: Centre for Informatics, WASEDA University
Lines: 32
Message-ID: <YTSUJI.96Jan31081138@suzuka.cfi.waseda.ac.jp>
References: <4eijt4$5sa@dali.cs.uni-magdeburg.de>
NNTP-Posting-Host: ytsuji@suzuka.cfi.waseda.ac.jp
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
In-reply-to: jesse@csmd.cs.UNI-Magdeburg.DE's message of 29 Jan 1996 14:00:04 GMT

In article <4eijt4$5sa@dali.cs.uni-magdeburg.de> jesse@csmd.cs.UNI-Magdeburg.DE (Roland Jesse) writes:
 |How may I avoid the error that `wchar_t' is previous declared when in 
 |/usr/X11R6/include/X11/Xlib.h is this line:
 |
 |typedef unsigned long wchar_t;
 |
 |and in /usr/include/stdlib.h this one:
 |
 |typedef _BSD_WCHAR_T_   wchar_t; 
 |
 |???
I only installed FreeBSD yesterday and haven't used it,
so my advice may be wrong.

 If both wchar_t are the same thing, replace the
line by
  #ifndef _wchar_t
  #define _wchar_t
  typedef unsigned short wchar_t;
  #endif

If one is a 16 bit thing, and another 32 (this happens
in one of the Japanese package, I suppose), I would
rename the 32 bit thing to Wchar_t. Remember the
size of wchar_t is ambiguous and invites trouble.

Cheers,
Tsuji
--
                                Dr Yoshimasa Tsuji
                     e-mail to: ytsuji@cfi.waseda.ac.jp
                     http://www.yt.cache.waseda.ac.jp