[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

-DSYSV causes clash between X11/Xosdefs.h and stddef.h ???



When compiling a file with g++ (egcs-2.90.29), I get different typedefs for
wchar_t, i.e.

X11/Xosdefs.h : typedef long wchar_t
stddef.h      : typedef int wchar_t

The source file includes <stdlib.h> and <X11/Xlib.h>, which is not unusual.
In X11/Xosdefs.h there is

#ifdef i386
#ifdef SYSV
#if !(defined(ISC) && defined(_POSIX_SOURCE))
#ifndef SCO
#ifndef _SCO_DS /* SCO 5.0 has SVR4 header files */
#define X_NOT_POSIX
#endif
#define X_NOT_STDC_ENV
#endif
#endif /* !(defined(ISC) && defined(_POSIX_SOURCE)) */
#endif
#endif

In X11/Xlib.h, X_NOT_STDC_ENV causes X_WCHAR to be defined and, consequently,
the typedef.

My question is, is this a bug in the X header files, i.e. should debian(linux)
be treated like SCO? -DSYSV is needed to compile some other files correctly;
at least, I assume that linux is SYSV-like.

Regards

-- 

R. A. Hogendoorn                                       E-mail: hogend@nlr.nl
Informatics Division                                   Tel. +31-527-24-8367 
National Aerospace Laboratory, The Netherlands         Fax. +31-527-24-8210 


Reply to: