Bug 8863

Summary: parse error before 'mcontext64_t'/'ucontext64_t' in xserver/os/utils.c on Mac OS X
Product: xorg Reporter: Peter Dyballa <Peter_Dyballa>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high    
Version: 7.1 (2006.05)   
Hardware: PowerPC   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:

Description Peter Dyballa 2006-11-02 13:20:42 UTC
While making the X server:

then mv -f ".deps/utils.Tpo" ".deps/utils.Plo"; else rm -f ".deps/utils.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -I../include -I../include -I../include -
I../include -I../include -I../include -no-cpp-precomp -I/usr/include/openssl -I/sw/include/pango-1.0 
-I/sw/lib/freetype219/include -I/sw/lib/freetype219/include/freetype2 -I/sw/lib/fontconfig2/include -
I/sw/include/libpng12 -I/usr/local/include -I/sw/include -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-
aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/X11R7/include -I/sw/lib/
freetype219/include/freetype2 -I../include -I../include -I../Xext -I../composite -I../damageext -I../
xfixes -I../Xi -I../mi -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb -pipe -fPIC -O0 
-mcpu=7450 -mtune=7450 -MT utils.lo -MD -MP -MF .deps/utils.Tpo -c utils.c  -fno-common -DPIC 
-o .libs/utils.o
In file included from /usr/include/signal.h:63,
                 from /usr/include/sys/select.h:146,
                 from /usr/include/unistd.h:483,
                 from /usr/X11R7/include/X11/Xos.h:168,
                 from utils.c:79:
/usr/include/sys/signal.h:145: error: parse error before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: parse error before 'ucontext64_t'
make[1]: *** [utils.lo] Error 1
make: *** [all-recursive] Error 1

My "workaround" was to add:

--- utils.c.orig	2006-11-02 11:13:02.000000000 +0100
+++ utils.c	2006-11-02 21:57:46.000000000 +0100
@@ -73,6 +73,10 @@
 #include <signal.h>
 #endif
 
+#ifdef __APPLE__
+#include <ucontext.h>
+#endif
+
 #if defined(WIN32) && !defined(__CYGWIN__)
 #include <X11/Xwinsock.h>
 #endif

Mac OS X 10.4.8
GCC 4.0.1
XORG_MAN_VERSION "Version 7.1.99.2"
Comment 1 Daniel Stone 2007-02-27 01:34:17 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Peter Dyballa 2007-03-11 13:15:39 UTC
The patch applied cures this problem.

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.