Currently X_NOT_STDC_ENV in Xosdefs.h is defined as long if the platform is SYSV on i386, but not ISC, SCO or _SEQUENT_: #ifdef i386 #ifdef SYSV #if !defined(ISC) && !defined(SCO) && !defined(_SEQUENT_) && !defined(sun) #if !defined(_POSIX_SOURCE) && !defined(_SCO_DS) #define X_NOT_POSIX #endif #define X_NOT_STDC_ENV #endif #endif This causes X_WCHAR to be defined, which in turn causes wchar_t to be defined to unsigned long in Xlib.h: #ifdef X_NOT_STDC_ENV #ifndef SCO324 #ifndef ISC #define X_WCHAR #endif #endif #endif #endif #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 This conflicts with the definition in the Solaris system headers. The fix is to not define X_NOT_STDC_ENV on Solaris, since Solaris is compliant with the C89 standard. [This bug originally reported as Sun bug 6251577 - found & fixed by Henry Zhao.]
Created attachment 2588 [details] [review] Patch to not define X_NOT_STDC_ENV on Solaris x86
Fix committed to CVS head: CVSROOT: /cvs/xorg Module name: xc Changes by: alanc@gabe.freedesktop.org 05/04/28 15:04:12 Log message: 2005-04-28 Alan Coopersmith <alan.coopersmith@sun.com> * include/Xosdefs.h: Don't define X_NOT_STDC_ENV on Solaris x86. Bugzilla #3158: https://bugs.freedesktop.org/show_bug.cgi?id=3158 Patch #2588: https://bugs.freedesktop.org/attachment.cgi?id=2588 (Henry Zhao, Sun Microsystems) Modified files: ./: ChangeLog xc/include/: Xosdefs.h Revision Changes Path 1.906 +8 -0 xc/ChangeLog 1.3 +2 -2 xc/include/Xosdefs.h
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.