Bug 86301

Summary: "wchar_t" conflit in gcc-lib (ver 3.2/2.96) and X11
Product: [Retired] Red Hat Linux Reporter: robin wang <robin>
Component: XFree86Assignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: drepper, jakub, mitr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: robin@cwb.gov.tw
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-28 23:01:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description robin wang 2003-03-19 07:30:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)

Description of problem:
conflicting types for `wchar_t' in /usr/X11R6/include/X11/Xlib.h 
and /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h




Version-Release number of selected component (if applicable):
gcc-3.2-7.src.rpm

How reproducible:
Always

Steps to Reproduce:
1. I can not simplify the program , since my program eniroment are very 
complicated But I list my sample :
    when building my library, produce following error :

--- Building NdmFm LIB ---
/usr/bin/cc -DLINUX_V8 -DLINUX -D_GNU_SOURCE -g -DMOTIF -DXT_CODE -DSYSV -
DXOPEN_C
ATALOG -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -
D_XOPEN_SOURC
E=500L -D_BSD_SOURCE -D_SVID_SOURCE  -I/nice/nice.v2/LINUX_V8/inc -
I/usr/include/X
11 -I/usr/X11R6/include -L/nice/nice.v2/LINUX_V8/lib -L/usr/X11R6/lib -
L/usr/lib/X
11 -lXm -lXp -lXt -lSM -lICE -lXext -lX11 -lXt -lX11 -c UxXt.c
2.
3.
    

Actual Results:  In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
                 from UxXt.c:25:
/usr/X11R6/include/X11/Xlib.h:78: conflicting types for `wchar_t'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h:294: previous 
declaration
of `wchar_t'



Additional info:

Comment 1 Jakub Jelinek 2003-03-19 20:13:40 UTC
This is an XFree86 thing.

Comment 2 Mike A. Harris 2003-03-20 01:37:18 UTC
#ifndef X_WCHAR
#include <stddef.h>
#else
#ifdef __UNIXOS2__
#include <stdlib.h>
#else
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;
#endif
#endif

Comment 4 Ulrich Drepper 2003-03-20 03:28:04 UTC
Looking at the part of the header you posted, W_WCHAR shouldn't be defined. 
Then wchar_t is picked up from stddef.h.  Of course I don't know what other
effects this will have.  But I would guess nothing which conflicts or which
would disable functionality.

Comment 6 Mike A. Harris 2004-09-28 23:01:45 UTC
Since this bugzilla report was filed, there have been several major
updates to the X Window System, which may resolve this issue.  We
encourage you to upgrade to the latest version of Fedora Core
(http://fedora.redhat.com).

If this issue turns out to still be reproduceable in the latest
version of Fedora Core, please file a bug report in the X.Org
bugzilla located at http://bugs.freedesktop.org in the "xorg"
component.

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker, and will review any bug fixes
that become available for consideration in future updates.