Subject: xsrc/28409: Xlib.h contains conflicting wchar_t (conflicts with stdlib.h)
To: None <,,>
From: None <>
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.
NetBSD olympus 1.6.2_STABLE NetBSD 1.6.2_STABLE (GENERIC) #0: Mon Jul 12 19:31:51 UTC 2004 i386

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>
#ifdef __EMX__
#include <stdlib.h>
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;

So, it looks like the import of X didn't include following that step. Our type is 'int', I believe.

Grab xloadimage if desired, from:

Extract and compile it.

It looks like Xlib.h should be changed, but I don't feel X-saavy enough to be comfortable making that change.