Bug 13546 - libxcb-1.1 build fails on Solaris/gcc because __solaris__ not defined
Summary: libxcb-1.1 build fails on Solaris/gcc because __solaris__ not defined
Status: RESOLVED WONTFIX
Alias: None
Product: XCB
Classification: Unclassified
Component: Library (show other bugs)
Version: 1.0
Hardware: SPARC Solaris
: medium normal
Assignee: Alan Coopersmith
QA Contact: xcb mailing list dummy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 01:59 UTC by acni
Modified: 2009-10-09 08:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description acni 2007-12-06 01:59:39 UTC
When building libxcb-1.1, the build fails on Solaris2.6 using gcc-4.1.2,
because gmake fails during compilation of file src/xcb_conn.c
with the message
...libxcb-1.1/src/xcb.h:35:20: error: stdint.h: No such file or directory

That file (src/xcb.h) correctly checks for solaris (i.e. presence
of inttypes.h instead of stdint.h):
  #if defined(__solaris__)
  #include <inttypes.h>
  #else
  #include <stdint.h>
  #endif
which means __solaris__ is incorrectly not defined.

Responsibility of configure? Or is __solaris__ automatically defined
with some compilers, but not with gcc??? (with gcc, the following
seem to be defined: __sparc__, __STDC__, __GNUC__
but not: __solaris__ or similar...)
Therefore, configure should check for Solaris and set a corresponding
variable.

Workaround: use -D__solaris__ in CFLAGS, then it works.
Comment 1 Jamey Sharp 2009-10-09 08:31:16 UTC
XCB builds on Solaris just fine these days, right?
Comment 2 Alan Coopersmith 2009-10-09 08:39:23 UTC
(In reply to comment #1)
> XCB builds on Solaris just fine these days, right?

It builds fine on modern Solaris releases, which have <stdint.h>

Solaris 2.6 is a very very old release at this point (1998), and
trying to mix ancient kernel & libc with modern libraries is always
going to be painful, and not very productive.   (If you're running
Solaris 2.6, it's because you have some reason for running old 
software in an unchanged environment - so why change it by introducing
new software like xcb?)   We've dropped support for releases that old
in other parts of the X Window System, so I'm going to admit this is
a bug, but one not worth fixing.


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.