Hi, I have finished the patches for phase2v21, they apply cleanly and the result compiles and installs (actually, that's probably a lie, as during the install target, near the end, the Hurd crashed. I don't have time to retry the target tonight, but will do it tomorrow, and then send over the MANIFEST file for inclusion).
As explained above, the MANIFEST and dh files stuff will be done tomorrow. The patch changes are explained in the patch files. #112 is special: It patches the result of patch #008 and #009. Editing the patches 008, 009 would also be a very good idea. In this case, 112 is obsolete of course. I can provide patches for patch 008,009 if you want, but those are really one line changes, so it's not hard to do. #110 was submitted upstream, but in an older version that doesn't apply cleanly[1]. It should probably be resubmitted (Branden? With your X member hat on?). #111 is new, and should be submitted. #112, as a "patch to a patch", should... I don't know, but you will. I have a couple of items on my list, that are not addressed by the above changes: * debian/scripts/patch.unapply uses $PATCH_TREE, which should be $SOURCE_TREE. * xrx: The same as with Linux does apply. It is not build currently, but should probably be activated for the Hurd as well as for Linux. So put it in site.cf if it isn't already (I remember something about that when browsing the list). That's it! Branden, your Debian packaging of X is excellent. Very easy to add ports. Thanks, Marcus [1] In addition, #110 doesn't reintroduce HasGcc and HasGcc2 in the cf file, as it is now provided by imake. That's happened after 4.0.1, that's why I changed it. -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED] Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.marcus-brinkmann.de
This patch brings the Hurd port up to date, fixing header includes, the gnu configuration, and various minor compilation and run time bugs. It should not affect other ports than the Hurd. (The one change in xf86_OSproc.h doesn't look Hurd specific, but presumably no other port uses this file, as the header is needed for compilation, it defines PCITAG). This is almost identical to what I sent to [EMAIL PROTECTED], except that it doesn't reintroduce HasGcc and HasGcc2 in the cf file, as this was removed in the meantime. It should apply better to the CVS version of XFree86 than the patch against vanilla 4.0.1. Marcus diff -ru xc-orig/config/cf/gnu.cf xc/config/cf/gnu.cf --- xc-orig/config/cf/gnu.cf Tue Oct 24 18:43:37 2000 +++ xc/config/cf/gnu.cf Tue Oct 24 19:58:12 2000 @@ -1,8 +1,9 @@ XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.7 2000/07/07 20:06:56 tsi Exp $ #ifndef OSName -#define OSName GNU +#define OSName DefaultOSName #endif + #ifndef OSVendor #define OSVendor /**/ #endif @@ -17,108 +18,169 @@ #endif XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) +#define GNUSourceDefines -D_POSIX_C_SOURCE=199309L \ + -D_POSIX_SOURCE -D_XOPEN_SOURCE \ + -D_BSD_SOURCE -D_SVID_SOURCE +XCOMM XXXMB: What about _GNU_SOURCE, see Linux/UseInstalled? + +#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H + +XCOMM Enable this when we have pthreads. +XCOMM #define HasPosixThreads YES +XCOMM #define ThreadedX YES +XCOMM #define HasThreadSafeAPI YES +XCOMM #define ThreadsLibraries -lpthread +XCOMM #define SystemMTDefines -D_REENTRANT + +#ifndef HasLibCrypt +#define HasLibCrypt YES +#endif + +#define BuildLibPathVar LD_LIBRARY_PATH +#ifndef HasGcc2ForCplusplus +# define HasGcc2ForCplusplus YES +#endif #define GccUsesGas YES #define UseGas YES #define GnuCpp YES -#define UseGccMakeDepend YES -#define HasGnuMake YES -#ifndef HasGcc2ForCplusplus -#define HasGcc2ForCplusplus YES +#define HasDlopen YES +#ifndef HasShadowPasswd +# define HasShadowPasswd YES #endif +#define HasPutenv YES -#define XserverNeedsSetUID YES +XCOMM Not implemented and will always fail. +#define HasShm YES -#define ProjectRoot /usr/X11R6 -#define YaccCmd bison -y -#define LexCmd flex -#ifndef LexLib -#define LexLib -lfl +#define HasBSD44Sockets YES +#define HasSockets YES +#define HasSnprintf YES +#define HasMkstemp YES +#define HasUsableFileMmap YES +#ifndef HasNCurses +#define HasNCurses YES #endif -#define ArCmd ar clq -#define AsCmd as -#define CcCmd gcc -#define CppCmd /lib/gcc-lib/i586--gnu/egcs-2.91.60/cpp -#define PreProcessCmd CcCmd -EP -x c -#define RanlibCmd ranlib -#define LdCmd ld -#if defined(UseInstalled) -#define DefaultCCOptions /**/ -#else -#define DefaultCCOptions -ansi -pedantic GccWarningOptions + +#define AvoidNullMakeCommand YES +#ifndef DebuggableLibraries +#define DebuggableLibraries NO #endif -#define GccGasOption -DGCCUSESGAS -#define DefaultGcc2i386Opt -O2 -#if defined(HasGcc2) && defined(i386Architecture) -#define OptimizedCDebugFlags DefaultGcc2i386Opt -#else -#define OptimizedCDebugFlags +#define CompressAllFonts YES +#define Malloc0ReturnsNull YES +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#ifndef NeedWidePrototypes +#define NeedWidePrototypes NO #endif +#define SetTtyGroup YES +#ifndef UseStaticTermcapLib +#define UseStaticTermcapLib NO +#endif -#define AsmDefines -DUSE_GAS -#define BootstrapCFlags -#define ExtensionOSDefines +#define MkdirHierCmd mkdir -p +#ifndef CcCmd +#define CcCmd gcc +#endif +#ifndef AsCmd +#define AsCmd as +#endif +#ifndef LdCmd +#define LdCmd ld +#endif -#ifdef i386Architecture -#define ServerExtraDefines GccGasOption XFree86ServerDefines -DNO_ALLOCA +#define AsmDefines -D__ELF__ +#define CplusplusCmd c++ +#ifndef TermcapLibrary +#if UseStaticTermcapLib +#define TermcapLibrary StaticLibrary(/usr/lib,ncurses) #else -#define ServerExtraDefines GccGasOption +#define TermcapLibrary -lncurses +#endif +#endif +#ifndef DoLoadableServer +#define DoLoadableServer YES #endif +#ifndef +#define CppCmd /lib/cpp +#endif +#define YaccCmd bison -y +#define LexCmd flex -l +#define LexLib -lfl +#define PreProcessCmd CcCmd -E +#define PostIncDir DefaultGccIncludeDir +#define LdCombineFlags -r +#ifndef LdPostLib +#define LdPostLib /* Never needed */ +#endif +#define HasWChar32 YES #define StandardCppOptions -traditional -#define StandardCppDefines StandardDefines -#define StandardDefines -D_XOPEN_SOURCE -D_POSIX_SOURCE -D_BSD_SOURCE -D__ELF__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -#define ConnectionFlags -DTCPCONN -#define HasBSD44Sockets YES -#define HasSockets YES +#define StandardCppDefines StandardDefines -#define UseElfFormat YES -#define HasSharedLibraries YES -#define HasDlopen YES -#define DlLibrary -ldl +#define HasVarRun YES +#define VarDbDirectory /var/state + +XCOMM i386Architecture +#define OptimizedCDebugFlags DefaultGcc2i386Opt +#define GNUMachineDefines -D__i386__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #define HasPlugin YES -#define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */ -#define DoLoadableServer YES +#define VendorHasX11R6_3libXext YES +#ifndef StandardDefines +#define StandardDefines -D__GNU__ GNUMachineDefines GNUSourceDefines +#endif -#include <gnuLib.rules> +#define DlLibrary -rdynamic -ldl -#define BuildXCSecurity YES -#define AvoidNullMakeCommand YES -#define CompressAllFonts YES -#define DirFailPrefix - -#define HasNdbm YES -#define HasPutenv YES -#define Malloc0ReturnsNull NO -#define NeedConstPrototypes YES -#define NeedFunctionPrototypes YES -#define NeedNestedPrototypes YES -#define NeedVarargsPrototypes YES -#define NeedWidePrototypes NO -#ifndef HasLibCrypt -# define HasLibCrypt YES -#endif -#define HasPoll YES +#define ServerExtraSysLibs /**/ -#define TermcapLibrary -lncurses +#define ConnectionFlags -DUNIXCONN -DTCPCONN -#ifndef GnuMallocLibrary -#define GnuMallocLibrary /* -lgnumalloc */ +/* Some of these man page defaults are overriden in the above OS sections */ +#ifndef ManSuffix +# define ManSuffix 1x +#endif +#ifndef ManDir +# define ManDir $(MANSOURCEPATH)1 +#endif +#ifndef LibManSuffix +# define LibManSuffix 3x +#endif +#ifndef LibmanDir +# define LibmanDir $(MANSOURCEPATH)3 +#endif +#ifndef FileManSuffix +# define FileManSuffix 5x +#endif +#ifndef FileManDir +# define FileManDir $(MANSOURCEPATH)5 #endif -#ifdef InstallCmd -#undef InstallCmd +#ifndef StaticLibrary +#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic #endif -#define InstallCmd /bin/install -#define TroffCmd groff -Tps +#define HasGnuMake YES + +#define MakeNamedTargetSubdir(dir,flags,subname)\ + $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname + +#define ArchitectureDefines -DGNU_ARCHITECTURE + +#define XserverNeedsSetUID YES + +#include <gnuLib.rules> + +XCOMM XXX Might need this if they are not careful with slashes. +XCOMM #define DirFailPrefix - + +#include <xfree86.cf> + + -#ifndef ExtraFilesToClean -# define ExtraFilesToClean *.core -#endif -#define BuildXTrueType NO -#ifdef i386Architecture -# include <xfree86.cf> -#endif diff -ru xc-orig/config/cf/gnuLib.rules xc/config/cf/gnuLib.rules --- xc-orig/config/cf/gnuLib.rules Sun Jun 6 10:47:44 1999 +++ xc/config/cf/gnuLib.rules Tue Oct 24 20:12:34 2000 @@ -4,13 +4,9 @@ * GNU/Hurd shared library rules */ -#ifndef UseElfFormat -#define UseElfFormat YES -#endif - /* * GNU/Hurd shared library rules - * Cloned from NetBSD/FreeBSD (ELF) shared library rules + * Cloned from Linux (ELF) shared library rules * */ @@ -18,13 +14,18 @@ #define HasSharedLibraries YES #endif #ifndef ForceNormalLib -#define ForceNormalLib YES +#define ForceNormalLib NO #endif -#ifndef BaseShLibReqs -#define BaseShLibReqs /* -lc implied by $(CC) */ +#ifndef SharedOldX +#define SharedOldX NO #endif +#undef SpecialMalloc +#define SpecialMalloc NO + +#define BaseShLibReqs -lc + #ifndef SharedDataSeparation #define SharedDataSeparation NO #endif @@ -38,7 +39,9 @@ #define ShLibIncludeFile <gnuLib.tmpl> #endif #ifndef SharedLibraryLoadFlags -#define SharedLibraryLoadFlags -shared -Wl,-rpath=$(USRLIBDIR) +XCOMM XXX To rpath or not to rpath... +XCOMM #define SharedLibraryLoadFlags -shared -Wl,-rpath=$(USRLIBDIR) +#define SharedLibraryLoadFlags -shared #endif #ifndef PositionIndependentCFlags #define PositionIndependentCFlags -fPIC @@ -48,9 +51,10 @@ #endif #ifndef ExtraLoadFlags #ifdef UseInstalled -#define ExtraLoadFlags -Wl,-rpath=$(USRLIBDIRPATH) +XCOMM XXX Maybe superfluous. +#define ExtraLoadFlags -Wl,-rpath-link=$(USRLIBDIRPATH) #else -#define ExtraLoadFlags -Wl,-dynamic-linker=/lib/ld.so.1 -Wl,-rpath=/lib:$(USRLIBDIRPATH) -Wl,-rpath-link=$(BUILDLIBDIR) +#define ExtraLoadFlags -Wl,-rpath-link=$(BUILDLIBDIR) #endif #endif @@ -63,11 +67,9 @@ install:: Concat(lib,libname.so.rev) @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - (T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ - $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T) @@\ - (T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.so.*$$/.so/'`;\ - $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T) @@\ - @if $(SOSYMLINK); then (set -x; \ @@\ + @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ + set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ + @if $(SOSYMLINK); then (set -x; \ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi #endif /* InstallSharedLibrary */ @@ -96,9 +98,9 @@ #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ AllTarget(Concat(lib,libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist @@\ +Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) [EMAIL PROTECTED] @@\ - SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; \ @@\ + @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ (cd down; $(CC) -o up/[EMAIL PROTECTED] $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ @@ -111,33 +113,48 @@ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + @MAJREV=`expr rev : '\(.*\)\.'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) #endif /* SharedLibraryTarget */ /* - * SharedLibraryDataTarget - generate rules to create shlib data file; - */ -#ifndef SharedLibraryDataTarget -#define SharedLibraryDataTarget(libname,rev,salist) -#endif /* SharedLibraryTarget */ - -/* * SharedDepLibraryTarget - generate rules to create a shared library. */ #ifndef SharedDepLibraryTarget +#ifdef UseInstalled +#ifndef LinkBuildSonameLibrary +#define LinkBuildSonameLibrary(lib) true +#endif +#else +#ifndef LinkBuildSonameLibrary +#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \ + cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .) +#endif +#endif + #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ AllTarget(Concat(lib,libname.so.rev)) @@\ @@\ Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) [EMAIL PROTECTED] @@\ - (cd down; $(CC) -o up/[EMAIL PROTECTED] $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ - $(RM) $@ @@\ + @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ + (cd down; $(CC) -o up/[EMAIL PROTECTED] $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ $(MV) [EMAIL PROTECTED] $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + @MAJREV=`expr rev : '\(.*\)\.'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) #endif /* SharedDepLibraryTarget */ @@ -147,7 +164,7 @@ @@\ name: deps @@\ $(RM) [EMAIL PROTECTED] @@\ - $(LD) -o [EMAIL PROTECTED] $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\ + $(CC) -o [EMAIL PROTECTED] $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ $(RM) $@ @@\ $(MV) [EMAIL PROTECTED] $@ @@\ @@\ @@ -161,30 +178,4 @@ */ #ifndef SharedLibraryDataTarget #define SharedLibraryDataTarget(libname,rev,salist) -#endif /* SharedLibraryDataTarget */ - -#ifndef InstallSharedLibraryData -#define InstallSharedLibraryData(libname,rev,dest) -#endif /* InstallSharedLibraryData */ - -/* - * SharedLibReferences - variables for shared libraries - */ -#ifndef SharedLibReferences -#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\ -revname = rev @@\ -Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\ -Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ -LintLibReferences(varname,libname,libsource) -#endif - -/* - * SharedDSLibReferences - variables for shared libraries - */ -#ifndef SharedDSLibReferences -#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\ -revname = rev @@\ -Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\ -Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\ -LintLibReferences(varname,libname,libsource) -#endif +#endif /* SharedLibraryTarget */ diff -ru xc-orig/config/cf/gnuLib.tmpl xc/config/cf/gnuLib.tmpl --- xc-orig/config/cf/gnuLib.tmpl Sun Jun 6 14:13:22 1999 +++ xc/config/cf/gnuLib.tmpl Tue Oct 24 20:13:07 2000 @@ -15,7 +15,6 @@ #endif #define CplusplusLibC -#define FrescoSysLibs CplusplusLibC MathLibrary #define SharedX11Reqs #define SharedOldXReqs $(LDPRELIB) $(XLIBONLY) @@ -29,6 +28,3 @@ #define SharedXtstReqs $(LDPRELIB) $(XLIB) #define SharedXieReqs $(LDPRELIB) $(XLIBONLY) #define SharedSMReqs $(LDPRELIB) $(ICELIB) -#define SharedFrescoReqs $(LDPRELIB) $(XLIBONLY) FrescoSysLibs -#define SharedXtfReqs $(LDPRELIB) $(FRESCOLIB) $(XTOOLLIB) $(XLIB) FrescoSysLibs - diff -ru xc-orig/config/imake/imake.c xc/config/imake/imake.c --- xc-orig/config/imake/imake.c Tue Oct 24 18:43:37 2000 +++ xc/config/imake/imake.c Tue Oct 24 19:31:14 2000 @@ -261,7 +261,7 @@ # define SYS_NMLN 257 # endif #endif -#ifdef linux +#if defined(linux) || defined(__GNU__) #include <limits.h> #include <stdio.h> #endif @@ -1151,7 +1151,7 @@ get_gcc_incdir(FILE *inFile) { static char* gcc_path[] = { -#if defined(linux) || defined(__OpenBSD__) +#if defined(linux) || defined(__OpenBSD__) || defined (__GNU__) "/usr/bin/cc", /* for Linux PostIncDir */ #endif "/usr/local/bin/gcc", diff -ru xc-orig/config/imake/imakemdep.h xc/config/imake/imakemdep.h --- xc-orig/config/imake/imakemdep.h Tue Oct 24 18:44:08 2000 +++ xc/config/imake/imakemdep.h Tue Oct 24 19:31:14 2000 @@ -171,13 +171,9 @@ #define imake_ccflags "-DSVR4" #endif -#ifdef MACH -#ifdef __GNU__ -#define imake_ccflags "" -#else +#if defined(MACH) && ! defined (__GNU__) #define imake_ccflags "-DNOSTDHDRS" #endif -#endif /* this is for OS/2 under EMX. This won't work with DOS */ #if defined(__EMX__) @@ -286,7 +282,7 @@ #if defined(__sgi) && defined(__ANSI_CPP__) #define USE_CC_E #endif -#ifdef MACH +#if defined(MACH) && !defined(__GNU__) #define USE_CC_E #endif #ifdef __minix_vmd @@ -300,9 +296,6 @@ #define USE_CC_E #define DEFAULT_CC "gcc" #endif -#if defined(__GNU__) -#define USE_CC_E -#endif #if defined (__QNX__) #define DEFAULT_CPP "/usr/X11R6/bin/cpp" #endif @@ -716,6 +709,10 @@ # define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" # define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" # define DEFAULT_OS_NAME "srm %[^\n]" +#elif defined(__GNU__) +# define DEFAULT_OS_MAJOR_REV "r %[0-9]" +# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" +# define DEFAULT_OS_NAME "srm %[^\n]" #elif defined(ISC) /* ISC all Versions ? */ /* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */ @@ -1035,6 +1032,9 @@ #endif #ifdef __NetBSD__ {"__NetBSD__", "1"}, +#endif +#ifdef __GNU__ + {"__GNU__", "1"}, #endif #ifdef __ELF__ {"__ELF__", "1"}, diff -ru xc-orig/lib/Xdmcp/GenKey.c xc/lib/Xdmcp/GenKey.c --- xc-orig/lib/Xdmcp/GenKey.c Wed Oct 21 08:12:00 1998 +++ xc/lib/Xdmcp/GenKey.c Tue Oct 24 19:31:14 2000 @@ -47,7 +47,7 @@ #define Time_t time_t #endif -#if defined(linux) || defined(CSRG_BASED) || (defined(sun) && defined(SVR4)) +#if defined(linux) || defined (__GNU__) || defined(CSRG_BASED) || (defined(sun) && defined(SVR4)) #include <stdlib.h> #else long random(); diff -ru xc-orig/programs/Xserver/Xprint/Init.c xc/programs/Xserver/Xprint/Init.c --- xc-orig/programs/Xserver/Xprint/Init.c Mon Dec 13 03:12:46 1999 +++ xc/programs/Xserver/Xprint/Init.c Tue Oct 24 19:31:14 2000 @@ -154,7 +154,7 @@ " print substr($5, 1, x-1)" " }' | sort"; #else -#if defined(CSRG_BASED) || defined(linux) || defined(ISC) +#if defined(CSRG_BASED) || defined(linux) || defined(ISC) || defined (__GNU__) const char *LIST_QUEUES = "LANG=C lpc status | grep -v '^\t' | " "sed -e /:/s/// | sort"; #else diff -ru xc-orig/programs/Xserver/hw/xfree86/SuperProbe/Probe.h xc/programs/Xserver/hw/xfree86/SuperProbe/Probe.h --- xc-orig/programs/Xserver/hw/xfree86/SuperProbe/Probe.h Tue Oct 24 18:43:47 2000 +++ xc/programs/Xserver/hw/xfree86/SuperProbe/Probe.h Tue Oct 24 19:59:35 2000 @@ -44,7 +44,7 @@ #include <stdlib.h> #endif /* MACH386 */ #include <ctype.h> -#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__QNX__) || defined(__QNXNTO__) +#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__QNX__) || defined(__QNXNTO__) || defined(__GNU__) #if defined(__ia64__) || defined(ia64) #include <sys/io.h> #include <asm/io.h> diff -ru xc-orig/programs/Xserver/hw/xfree86/common/xf86Config.c xc/programs/Xserver/hw/xfree86/common/xf86Config.c --- xc-orig/programs/Xserver/hw/xfree86/common/xf86Config.c Tue Oct 24 18:44:33 2000 +++ xc/programs/Xserver/hw/xfree86/common/xf86Config.c Tue Oct 24 19:31:14 2000 @@ -41,7 +41,7 @@ #if (defined(i386) || defined(__i386__)) && \ (defined(__FreeBSD__) || defined(__NetBSD__) || defined(linux) || \ - (defined(SVR4) && !defined(sun))) + (defined(SVR4) && !defined(sun)) || defined (__GNU__)) #define SUPPORT_PC98 #endif diff -ru xc-orig/programs/Xserver/hw/xfree86/common/xf86Helper.c xc/programs/Xserver/hw/xfree86/common/xf86Helper.c --- xc-orig/programs/Xserver/hw/xfree86/common/xf86Helper.c Tue Oct 24 18:44:33 2000 +++ xc/programs/Xserver/hw/xfree86/common/xf86Helper.c Tue Oct 24 20:01:45 2000 @@ -31,7 +31,7 @@ #include "xf86Bus.h" /* For xf86GetClocks */ -#if defined(CSRG_BASED) || defined(MACH386) +#if defined(CSRG_BASED) || defined(MACH386) || defined (__GNU__) #include <sys/resource.h> #endif @@ -2148,7 +2148,7 @@ static int saved_nice; if (up) { -#if defined(CSRG_BASED) || defined(MACH386) +#if defined(CSRG_BASED) || defined(MACH386) || defined(__GNU__) saved_nice = getpriority(PRIO_PROCESS, 0); setpriority(PRIO_PROCESS, 0, -20); #endif @@ -2157,7 +2157,7 @@ nice(-20 - saved_nice); #endif } else { -#if defined(CSRG_BASED) || defined(MACH386) +#if defined(CSRG_BASED) || defined(MACH386) || defined(__GNU__) setpriority(PRIO_PROCESS, 0, saved_nice); #endif #if defined(SYSV) || defined(SVR4) || defined(linux) diff -ru xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile --- xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile Tue Oct 24 18:43:55 2000 +++ xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile Tue Oct 24 20:02:41 2000 @@ -8,11 +8,11 @@ MOUSEOBJ = hurd_mouse.o SRCS = hurd_init.c hurd_video.c hurd_io.c libc_wrapper.c $(BIOS_MOD).c \ - VTsw_noop.c posix_tty.c std_kbdEv.c $(MOUSESRC) \ + VTsw_noop.c posix_tty.c $(MOUSESRC) \ stdResource.c stdPci.c sigiostubs.c pm_noop.c kmod_noop.c agp_noop.c OBJS = hurd_init.o hurd_video.o hurd_io.o libc_wrapper.o $(BIOS_MOD).o \ - VTsw_noop.o posix_tty.o std_kbdEv.o $(MOUSEOBJ) \ + VTsw_noop.o posix_tty.o $(MOUSEOBJ) \ stdResource.o stdPci.o sigiostubs.o pm_noop.o kmod_noop.o agp_noop.o INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \ @@ -28,7 +28,6 @@ LinkSourceFile(VTsw_noop.c,../shared) LinkSourceFile(posix_tty.c,../shared) -LinkSourceFile(std_kbdEv.c,../shared) LinkSourceFile(libc_wrapper.c,../shared) LinkSourceFile(stdResource.c,../shared) LinkSourceFile(stdPci.c,../shared) diff -ru xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c --- xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c Sat Sep 4 15:04:43 1999 +++ xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c Tue Oct 24 19:31:14 2000 @@ -117,3 +117,11 @@ if( ioctl( xf86Info.consoleFd, _IOW('k', 1, int),&data) < 0) FatalError("can't reset keyboard mode (%s)\n",strerror(errno)); } + +void +xf86KbdEvents() +{ + kd_event ke; + while( read(xf86Info.consoleFd, &ke, sizeof(ke)) == sizeof(ke) ) + xf86PostKbdEvent(ke.value.sc); +} diff -ru xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_mouse.c xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_mouse.c --- xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_mouse.c Thu Feb 10 23:33:44 2000 +++ xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_mouse.c Tue Oct 24 19:31:14 2000 @@ -168,7 +168,7 @@ pBuf = (unsigned char *)eventList; n = 0; while ((c = XisbRead(pMse->buffer)) >= 0 && n < sizeof(eventList)) - pBuf[n] = (unsigned char)c; + pBuf[n++] = (unsigned char)c; if (n == 0) return; @@ -289,7 +289,7 @@ p->BuiltinNames = BuiltinNames; p->DefaultProtocol = DefaultProtocol; p->CheckProtocol = CheckProtocol; - p->PreInit = OSMousePreInit; + p->PreInit = OsMousePreInit; return p; } diff -ru xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_video.c xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_video.c --- xc-orig/programs/Xserver/hw/xfree86/os-support/hurd/hurd_video.c Thu Apr 29 14:24:52 1999 +++ xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_video.c Tue Oct 24 19:31:14 2000 @@ -169,3 +169,9 @@ { } +Bool +xf86CheckMTRR(int s) +{ + return FALSE; +} + diff -ru xc-orig/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h --- xc-orig/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Tue Oct 24 18:43:54 2000 +++ xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Tue Oct 24 19:31:14 2000 @@ -69,6 +69,8 @@ #ifndef _XF86_OSPROC_H #define _XF86_OSPROC_H +#include "xf86Pci.h" + /* * The actual prototypes have been pulled into this seperate file so * that they can can be used without pulling in all of the OS specific diff -ru xc-orig/programs/Xserver/hw/xfree86/vgahw/vgaHW.c xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c --- xc-orig/programs/Xserver/hw/xfree86/vgahw/vgaHW.c Tue Oct 24 18:43:57 2000 +++ xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c Tue Oct 24 20:04:04 2000 @@ -30,7 +30,7 @@ #define SAVE_FONT1 #endif -#if defined(Lynx) || defined(CSRG_BASED) || defined(MACH386) || defined(linux) || defined(AMOEBA) || defined(MINIX) || defined(__QNX__) || defined(sun) +#if defined(Lynx) || defined(CSRG_BASED) || defined(MACH386) || defined(linux) || defined(AMOEBA) || defined(MINIX) || defined(__QNX__) || defined(sun) || defined(__GNU__) #ifndef NEED_SAVED_CMAP #define NEED_SAVED_CMAP #endif diff -ru xc-orig/programs/Xserver/os/utils.c xc/programs/Xserver/os/utils.c --- xc-orig/programs/Xserver/os/utils.c Tue Oct 24 18:44:49 2000 +++ xc/programs/Xserver/os/utils.c Tue Oct 24 19:31:14 2000 @@ -155,7 +155,7 @@ #ifdef MEMBUG #define MEM_FAIL_SCALE 100000 long Memory_fail = 0; -#ifdef linux +#if defined(linux) || defined(__GNU__) #include <stdlib.h> /* for random() */ #endif #endif diff -ru xc-orig/programs/Xserver/os/xalloc.c xc/programs/Xserver/os/xalloc.c --- xc-orig/programs/Xserver/os/xalloc.c Tue Oct 24 18:43:58 2000 +++ xc/programs/Xserver/os/xalloc.c Tue Oct 24 19:31:14 2000 @@ -249,6 +249,15 @@ #define HAS_GETPAGESIZE #endif /* linux */ +#if defined(__GNU__) +#define HAS_MMAP_ANON +#include <sys/types.h> +#include <sys/mman.h> +#include <mach/vm_param.h> /* PAGE_SIZE */ +#define HAS_SC_PAGESIZE +#define HAS_GETPAGESIZE +#endif /* __GNU__ */ + #if defined(CSRG_BASED) #define HAS_MMAP_ANON #define HAS_GETPAGESIZE diff -ru xc-orig/programs/Xserver/xkb/ddxLoad.c xc/programs/Xserver/xkb/ddxLoad.c --- xc-orig/programs/Xserver/xkb/ddxLoad.c Sat Jun 17 20:48:03 2000 +++ xc/programs/Xserver/xkb/ddxLoad.c Tue Oct 24 19:31:14 2000 @@ -41,7 +41,7 @@ #include "XKBsrv.h" #include "XI.h" -#if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) +#if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__) #include <paths.h> #endif diff -ru xc-orig/programs/xdm/daemon.c xc/programs/xdm/daemon.c --- xc-orig/programs/xdm/daemon.c Tue Oct 24 18:43:59 2000 +++ xc/programs/xdm/daemon.c Tue Oct 24 19:31:14 2000 @@ -36,7 +36,7 @@ #else #include <sys/ioctl.h> #endif -#if defined(__osf__) || defined(linux) || defined(MINIX) +#if defined(__osf__) || defined(linux) || defined(MINIX) || defined(__GNU__) #define setpgrp setpgid #endif #ifdef hpux @@ -98,7 +98,7 @@ stat = setpgid(child_id, child_id); /* This gets error EPERM. Why? */ #else -#if defined(SYSV)||defined(__GNU__) +#if defined(SYSV) stat = 0; /* don't know how to set child's process group */ #else stat = setpgrp(child_id, child_id); @@ -124,7 +124,7 @@ * Close standard file descriptors and get rid of controlling tty */ -#if defined(SYSV) || defined(SVR4) || defined(__GNU__) || defined(__QNXNTO__) +#if defined(SYSV) || defined(SVR4) || defined(__QNXNTO__) setpgrp (); #else setpgrp (0, getpid()); diff -ru xc-orig/programs/xdm/dm.h xc/programs/xdm/dm.h --- xc-orig/programs/xdm/dm.h Tue Oct 24 18:44:54 2000 +++ xc/programs/xdm/dm.h Tue Oct 24 19:31:14 2000 @@ -276,7 +276,7 @@ }; /* setgroups is not covered by POSIX, arg type varies */ -#if defined(SYSV) || defined(SVR4) || defined(__osf__) || defined(linux) +#if defined(SYSV) || defined(SVR4) || defined(__osf__) || defined(linux) || defined (__GNU__) #define GID_T gid_t #else #define GID_T int diff -ru xc-orig/programs/xdm/util.c xc/programs/xdm/util.c --- xc-orig/programs/xdm/util.c Tue Oct 24 18:43:59 2000 +++ xc/programs/xdm/util.c Tue Oct 24 20:07:55 2000 @@ -51,7 +51,7 @@ #undef _POSIX_SOURCE #endif #endif -#if defined(__osf__) || defined(linux) || defined(MINIX) || defined(__QNXNTO__) +#if defined(__osf__) || defined(linux) || defined(MINIX) || defined(__QNXNTO__) || defined (__GNU__) #define setpgrp setpgid #endif @@ -239,8 +239,8 @@ #ifdef CSRG_BASED setsid(); #else -#if defined(SYSV) || defined(SVR4) || defined(__GNU__) || defined(__CYGWIN__) -#if !(defined(SVR4) && defined(i386)) || defined(SCO325) || defined(__GNU__) +#if defined(SYSV) || defined(SVR4) || defined(__CYGWIN__) +#if !(defined(SVR4) && defined(i386)) || defined(SCO325) setpgrp (); #endif #else diff -ru xc-orig/programs/xfs/os/utils.c xc/programs/xfs/os/utils.c --- xc-orig/programs/xfs/os/utils.c Tue Oct 24 18:44:55 2000 +++ xc/programs/xfs/os/utils.c Tue Oct 24 19:31:15 2000 @@ -46,7 +46,7 @@ #include <stdio.h> #include <X11/Xos.h> -#ifdef linux +#if defined(linux) || defined (__GNU__) #include <stdlib.h> #endif #include "misc.h" diff -ru xc-orig/programs/xgc/tests.c xc/programs/xgc/tests.c --- xc-orig/programs/xgc/tests.c Tue Oct 24 18:43:59 2000 +++ xc/programs/xgc/tests.c Tue Oct 24 20:08:50 2000 @@ -28,7 +28,7 @@ #define random lrand48 #endif -#if !defined(sgi) && !defined(linux) && !defined(__alpha__) && !defined(__CYGWIN__) +#if !defined(sgi) && !defined(linux) && !defined(__alpha__) && !defined(__CYGWIN__) && !defined(__GNU__) extern long random(); #endif diff -ru xc-orig/programs/xload/Imakefile xc/programs/xload/Imakefile --- xc-orig/programs/xload/Imakefile Sat Jun 17 20:48:40 2000 +++ xc/programs/xload/Imakefile Tue Oct 24 19:31:15 2000 @@ -3,7 +3,7 @@ DEPLIBS = XawClientDepLibs LOCAL_LIBRARIES = XawClientLibs -#ifdef i386MachArchitecture +#if defined(i386MachArchitecture) && !defined(GNUMachArchitecture) SYS_LIBRARIES = -lsys #elif defined(SGIArchitecture) && !defined(MipsN32Architecture) SYS_LIBRARIES = -lmld diff -ru xc-orig/programs/xload/get_load.c xc/programs/xload/get_load.c --- xc-orig/programs/xload/get_load.c Tue Oct 24 18:44:50 2000 +++ xc/programs/xload/get_load.c Tue Oct 24 19:31:15 2000 @@ -52,7 +52,7 @@ #ifndef macII #ifndef apollo #ifndef LOADSTUB -#if !defined(linux) && !defined(AMOEBA) && !defined(__EMX__) +#if !defined(linux) && !defined(AMOEBA) && !defined(__EMX__) && !defined(__GNU__) #include <nlist.h> #endif /* linux || AMOEBA */ #endif /* LOADSTUB */ @@ -461,6 +461,44 @@ #else /* linux */ +#ifdef __GNU__ + +#include <mach.h> + +static processor_set_t default_set; + +void InitLoadPoint() +{ + if (processor_set_default (mach_host_self (), &default_set) != KERN_SUCCESS) + xload_error("cannot get processor_set_default", ""); +} + +/* ARGSUSED */ +void GetLoadPoint( w, closure, call_data ) + Widget w; /* unused */ + caddr_t closure; /* unused */ + caddr_t call_data; /* pointer to (double) return value */ +{ + host_t host; + struct processor_set_basic_info info; + unsigned info_count; + + info_count = PROCESSOR_SET_BASIC_INFO_COUNT; + if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, + (processor_set_info_t) &info, &info_count) + != KERN_SUCCESS) + { + InitLoadPoint(); + info.load_average = 0; + } + + *(double *)call_data = info.load_average * 1000 / LOAD_SCALE; + + return; +} + +#else /* __GNU__ */ + #ifdef LOADSTUB void InitLoadPoint() @@ -1032,6 +1070,7 @@ #endif /* __bsdi__ else */ #endif /* __osf__ else */ #endif /* LOADSTUB else */ +#endif /* __GNU__ else */ #endif /* linux else */ #endif /* AMOEBA else */ #endif /* KVM_ROUTINES else */
This patch fixes a bug which was not in #110, as it was introduced since the release of 4.0.1. * xdm/Imakefile: The Hurd does also needs the DlLibrary at this place. (Somehow this check looks broken in general. It should probably check for HasDlopen, as this is what is used in the source). --- xc/programs/xdm/Imakefile~ Tue Oct 24 18:44:54 2000 +++ xc/programs/xdm/Imakefile Tue Oct 24 23:40:44 2000 @@ -50,7 +50,7 @@ #if SharedLibXdmGreet GREET_DIR = greeter -#if SystemV4 || (SharedLibXdmGreet && (defined(LinuxArchitecture) || defined(NetBSDArchitecture))) +#if SystemV4 || (SharedLibXdmGreet && (defined(LinuxArchitecture) || defined(NetBSDArchitecture) ||| defined(GNUMachArchitecture))) DLLIBRARY = DlLibrary #endif #else
A bug in #008: The Hurd doesn't have PAM support, so it should not be enabled for our architecture. This patch-patch patches patch #008, logically. Instead, #008 could be edited in place, or somebody could take care of HasPam in the cf files. A bug in #009: The set process group stuff is glibc on the Hurd, so adjust the code (like it is done in several other places). Same comment as above. --- xc/programs/xdm/Imakefile~ Tue Oct 24 23:40:44 2000 +++ xc/programs/xdm/Imakefile Tue Oct 24 23:43:13 2000 @@ -75,7 +75,7 @@ PWD_DEFINES = -DUSESHADOW -DSHADOWSUITE #endif -#if 1 +#if !GNUMachArchitecture PAM_LIBRARIES = -lpam DlLibrary PAM_DEFINES = -DUSE_PAM #endif --- xc/programs/xdm/greeter/Imakefile~ Tue Oct 24 18:44:54 2000 +++ xc/programs/xdm/greeter/Imakefile Tue Oct 24 23:43:30 2000 @@ -65,7 +65,7 @@ PWD_DEFINES = -DUSESHADOW #endif -#if 1 +#if !GNUMachArchitecture PAM_DEFINES = -DUSE_PAM #endif --- xc/programs/xfs/os/daemon.c~ Tue Oct 24 20:32:52 2000 +++ xc/programs/xfs/os/daemon.c Wed Oct 25 00:26:29 2000 @@ -36,7 +36,7 @@ #else #include <sys/ioctl.h> #endif -#if defined(__osf__) || defined(linux) || defined(MINIX) +#if defined(__osf__) || defined(linux) || defined(MINIX) || defined(__GNU__) #define setpgrp setpgid #endif #ifdef hpux