Re: [PATCH] Update gnu.cf and add support for GNU/K*BSD
Robert Millan wrote (in a message from Friday Nov 21) --- xc/config/cf.old/Imake.cf2003-11-20 23:45:05.0 +0100 +++ xc/config/cf/Imake.cf2003-11-21 00:13:21.0 +0100 @@ -177,6 +177,11 @@ # endif /* __hppa__ */ #endif /* OpenBSD */ +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD__) || defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + #ifdef __NetBSD__ # define MacroIncludeFile NetBSD.cf # define MacroFile NetBSD.cf @@ -224,6 +229,11 @@ # endif #endif /* NetBSD */ +/* Systems based on kernel of NetBSD */ +#if defined(__NetBSD__) || defined(__NetBSD_kernel__) +#define KNetBSDArchitecture +#endif + #ifdef __FreeBSD__ # define MacroIncludeFile FreeBSD.cf # define MacroFile FreeBSD.cf @@ -254,6 +264,11 @@ # endif #endif /* __FreeBSD__ */ +/* Systems based on kernel of FreeBSD */ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#define KFreeBSDArchitecture +#endif + #ifdef AMOEBA /* Should be before the 'sun' entry because we may be cross-compiling */ # define MacroIncludeFile Amoeba.cf @@ -962,10 +977,20 @@ #define i386Architecture #endif /* minix */ -#ifdef MACH -#ifdef __GNU__ +/* Systems with GNU libc and userland */ +#if defined(__GNU__) || defined(__GNU_KFreeBSD__) || \ + defined(__GNU_KNetBSD__) || defined(__GNU_KOpenBSD__) +#define GNUArchitecture #define MacroIncludeFile gnu.cf #define MacroFile gnu.cf +#ifdef __i386__ +#define i386Architecture +#endif +#endif + +#ifdef MACH +#ifdef __GNU__ +/* Mach-based GNU system */ #define GNUMachArchitecture #else #define MacroIncludeFile mach.cf This patch together with the one in bugzilla #908 broke XFree86 builds on OpenBSD on everything but i386. By inspection of the code, I guess it also breaks FreeBSD and NetBSD on non i386 platforms. The problem is that the patch above fails to define K*BSDArchitecture because __*BSD__ is #undef'd before the attempt to define the former. The following patch to Imake.cf makes it behave as intended and causes the current code in xc/programs/Xserver/hw/xfre86/os-support/Imakefile to work again. But systems that don't define BUS_SUBDIR will fail anyways. So maybe it's better to remove the gigantic test to define BUS_SUBDIR? --- xc/config/cf/Imake.cf.orig Mon Dec 15 20:32:07 2003 +++ xc/config/cf/Imake.cf Mon Dec 15 20:33:21 2003 @@ -102,6 +102,7 @@ # undef __OpenBSD__ # undef __NetBSD__ # define OpenBSDArchitecture +# define KOpenBSDArchitecture # define MacroIncludeFile OpenBSD.cf # define MacroFile OpenBSD.cf # ifdef __i386__ @@ -178,7 +179,7 @@ #endif /* OpenBSD */ /* Systems based on kernel of OpenBSD */ -#if defined(__OpenBSD__) || defined(__OpenBSD_kernel__) +#if defined(__OpenBSD_kernel__) #define KOpenBSDArchitecture #endif @@ -187,6 +188,7 @@ # define MacroFile NetBSD.cf # undef __NetBSD__ # define NetBSDArchitecture +# define KNetBSDArchitecture # ifdef __i386__ # define i386BsdArchitecture # define i386Architecture @@ -230,7 +232,7 @@ #endif /* NetBSD */ /* Systems based on kernel of NetBSD */ -#if defined(__NetBSD__) || defined(__NetBSD_kernel__) +#if defined(__NetBSD_kernel__) #define KNetBSDArchitecture #endif @@ -239,6 +241,7 @@ # define MacroFile FreeBSD.cf # undef __FreeBSD__ # define FreeBSDArchitecture +# define KFreeBSDArchitecture # ifdef __i386__ # define i386BsdArchitecture # define i386Architecture @@ -265,7 +268,7 @@ #endif /* __FreeBSD__ */ /* Systems based on kernel of FreeBSD */ -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if defined(__FreeBSD_kernel__) #define KFreeBSDArchitecture #endif Matthieu ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: XFree86 4.4.0 RC1
The following patches fix the setjmp issue on Solaris 2.5.1 x86: *** programs/Xserver/hw/xfree86/xf86cfg/loader.c.orig Fri Jun 7 07:03:32 2002 --- programs/Xserver/hw/xfree86/xf86cfg/loader.cMon Dec 15 16:54:38 2003 *** *** 35,46 --- 35,53 #include loader.h #include stubs.h #include X11/Xresource.h + #include Xos.h #ifdef USE_MODULES #include stdio.h #include stdlib.h #include string.h + #if defined(X_POSIX_C_SOURCE) + #define _POSIX_C_SOURCE X_POSIX_C_SOURCE #include setjmp.h + #undef _POSIX_C_SOURCE + #else + #include setjmp.h + #endif #include signal.h #include ctype.h *** programs/xedit/lisp/private.h.orig Tue Jun 10 21:08:00 2003 --- programs/xedit/lisp/private.h Mon Dec 15 16:56:40 2003 *** *** 32,41 --- 32,48 #ifndef Lisp_private_h #define Lisp_private_h + #include X11/Xos.h #include stdio.h #include stdlib.h #include string.h + #if defined(X_POSIX_C_SOURCE) + #define _POSIX_C_SOURCE X_POSIX_C_SOURCE #include setjmp.h + #undef _POSIX_C_SOURCE + #else + #include setjmp.h + #endif #include unistd.h #include sys/time.h #include lisp/internal.h Regards, Lindsay Haigh [EMAIL PROTECTED] vensys.com To: [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED] Subject: Re: XFree86 4.4.0 RC1 e86.Org 12/12/03 14:30 Please respond to devel programs/xdm/dm.h has #if defined(X_POSIX_C_SOURCE) #define _POSIX_C_SOURCE X_POSIX_C_SOURCE #include setjmp.h #include limits.h #undef _POSIX_C_SOURCE #else #include setjmp.h #include limits.h #endif and Xosdefs.h has #ifdef sun /* Imake configs define SVR4 on Solaris, but cc gcc only define __SVR4 * This check allows non-Imake configured programs to build correctly. */ #if defined(__SVR4) !defined(SVR4) #define SVR4 #endif #ifdef SVR4 /* define this to whatever it needs to be */ #define X_POSIX_C_SOURCE 199300L #endif #endif so something similar for xf86cfg/loader.c and xedit/lisp/private.h should work. I'll test this on Monday. Regards, Lindsay Haigh David Dawes [EMAIL PROTECTED] To: [EMAIL PROTECTED] .Orgcc: Sent by: Subject: Re: XFree86 4.4.0 RC1 [EMAIL PROTECTED] ree86.Org 12/12/03 13:23 Please respond to devel On Fri, Dec 12, 2003 at 09:32:18AM +1000, [EMAIL PROTECTED] wrote: It is in /usr/include/setjmp.h, but only #ifndef _JBLEN (this is then defined later in the header) and (not #if defined(__STDC__) or #if __STDC__ == 0 || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)). I have yet to determine the status and cause of these conditions. I notice that some of these are defined in various config/cf/*.cf files, but not in sun.cf or xfree86.cf. In later versions of Solaris, the condition is: #if __STDC__ == 0 || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(__EXTENSIONS__) and we define __EXTENSIONS__ for our builds. Something like: #define _POSIX_C_SOURCE #include setjmp.h #undef _POSIX_C_SOURCE should work though. Everything should now be fixed except the setjmp.h issue. David -- David Dawes developer/release engineer
Int10 problems on Solaris 2.5.1 x86 with XFree86 4.4.0 RC1
On Solaris 2.5.1 x86, XFree86 4.4.0 RC1 (and 4.3.0) won't start, with the following error: Fatal server error: xf86MapVidMem: mmap failure: No such device or address as a result of the xf86MapVidMem call in SetResetBIOSVars from xc/programs/XFree86/hw/xfree86/int10/helper_exec.c. The problem seems to be the address of zero that is passed in this call. The device is /dev/vt01 which exists and isn't a problem in other mmap calls. If I remove all calls to SetResetBIOSVars and xf86Int10SaveRestoreBIOSVars (which were introduced in 4.3.0) then everything seems to work ok. Does anyone know how to get around/fix this properly? Regards, Lindsay Haigh ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel