Bug 156950

Summary: Koffice compilation fails in kross module on OpenSolaris
Product: [Applications] koffice Reporter: Moinak Ghosh <moinakg>
Component: generalAssignee: KOffice Bug Wranglers <koffice-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: Undefine _XPG4 in Objects.hxx and pythonconfig.h on OpenSolaris

Description Moinak Ghosh 2008-01-30 06:57:59 UTC
Version:           1.6.3 (using KDE 3.5.8)
Installed from:    Compiled From Sources
Compiler:          Gcc 3.4.3 
OS:                Solaris

The Python scripting code in kross fails to build due to conflicting definitions of the swab function imported via pythonconfig.h -> Python.h. This happens due to a certain combination of macro definitions in effect that affects the OpenSolaris headers stdlib.h and unistd.h.

The solution is to undefine _XPG4 before including Python.h. A suggested patch is attached.
Comment 1 Moinak Ghosh 2008-01-30 07:01:09 UTC
Created attachment 23362 [details]
Undefine _XPG4 in Objects.hxx and pythonconfig.h on OpenSolaris
Comment 2 Sebastian Sauer 2008-01-30 20:22:48 UTC
Patch applied with r768839 and forward-ported to trunk with r768846. Thank you very much Moinak!