Subject: xsrc/28409: Xlib.h contains conflicting wchar_t (conflicts with stdlib.h)
To: None <xsrc-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <david@netbsd.org>
List: netbsd-bugs
Date: 11/24/2004 16:18:00
>Number: 28409
>Category: xsrc
>Synopsis: Xlib.h contains conflicting wchar_t (conflicts with stdlib.h)
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: xsrc-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 24 16:18:00 +0000 2004
>Originator: David Maxwell
>Release: netbsd-1-6 from July 2004.
>Organization:
>Environment:
NetBSD olympus 1.6.2_STABLE NetBSD 1.6.2_STABLE (GENERIC) #0: Mon Jul 12 19:31:51 UTC 2004 cyber@b5.urc.uninett.no:/usr/users/autobuild/autobuild/netbsd-1-6/i386/OBJ/usr/users/autobuild/autobuild/netbsd-1-6/src/sys/arch/i386/compile/GENERIC i386
>Description:
Rebirth of PR/11788.
While building Xloadimage, I got conflicts for wchar_t:
In file included from image.h:23,
from xloadimage.h:15,
from mcidas.c:7:
/usr/include/stdlib.h:57: conflicting types for `wchar_t'
/usr/X11R6/include/X11/Xlib.h:78: previous declaration of `wchar_t'
Xlib.h reads:
#ifndef X_WCHAR
#include <stddef.h>
#else
#ifdef __EMX__
#include <stdlib.h>
#else
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;
#endif
#endif
So, it looks like the import of X didn't include following that step. Our type is 'int', I believe.
>How-To-Repeat:
Grab xloadimage if desired, from:
ftp://ftp.x.org/R5contrib/xloadimage.4.1.tar.gz
Extract and compile it.
>Fix:
It looks like Xlib.h should be changed, but I don't feel X-saavy enough to be comfortable making that change.