Bug 189 - _XOPEN_SOURCE defines break builds on Solaris Express
Summary: _XOPEN_SOURCE defines break builds on Solaris Express
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: SPARC Solaris
: high normal
Assignee: Alan Coopersmith
QA Contact:
Depends on:
Reported: 2004-02-14 18:57 UTC by Alan Coopersmith
Modified: 2004-08-28 17:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Patch to miarc.c & xf86cmap.c (1.13 KB, patch)
2004-02-16 12:23 UTC, Alan Coopersmith
no flags Details | Splinter Review

Description Alan Coopersmith 2004-02-14 18:57:56 UTC
Forcing _XOPEN_SOURCE to be defined when including <math.h> on Solaris Express
(the pre-release version of Solaris 10) when using a C compiler in C99 mode
(such as Sun Studio 8 cc with the arguments specified in the current imake
configs) results in failing to compile with errors:

"/usr/include/sys/feature_tests.h", line 263: #error: "Compiler or options
invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications"

Fortunately, Solaris does not require _XOPEN_SOURCE in order to get the 
definitions of hypot or pow, so it can simply be added to the list of defines
to check for skipping the forced definition.
Comment 1 Alan Coopersmith 2004-02-16 12:23:35 UTC
Created attachment 98 [details] [review]
Patch to miarc.c & xf86cmap.c
Comment 2 Alan Coopersmith 2004-08-29 10:49:57 UTC
The same fix needs to be applied to programs/Xserver/hw/xfree86/xaa/xaaWideLine.c
if you build with #define LoadableServer NO.   That fix was applied to CVS head on

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.