Bug 189

Summary: _XOPEN_SOURCE defines break builds on Solaris Express
Product: xorg Reporter: Alan Coopersmith <alan.coopersmith>
Component: Server/GeneralAssignee: Alan Coopersmith <alan.coopersmith>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: roland.mainz
Version: unspecified   
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to miarc.c & xf86cmap.c none

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
2004-08-28.

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.