--- gcconfig.h.orig Tue Oct 26 15:40:54 1999 +++ gcconfig.h Wed Jul 19 02:07:50 2000 @@ -22,10 +22,23 @@ /* Machine specific parts contributed by various people. See README file. */ -/* First a unified test for Linux: */ +/* First a unified test for the Multi-platform OS's: */ # if defined(linux) || defined(__linux__) # define LINUX # endif +# if defined(__FreeBSD__) +# define FREEBSD +# endif +# if defined(__NetBSD__) +# define NETBSD +# endif +# if defined(__OpenBSD__) +# define OPENBSD +# endif +# if defined(bsdi) +# define BSDI +# endif + /* Determine the machine type: */ # if defined(sun) && defined(mc68000) @@ -38,24 +51,16 @@ # define HP # define mach_type_known # endif -# if defined(__OpenBSD__) && defined(m68k) +# if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(m68k) # define M68K -# define OPENBSD # define mach_type_known # endif -# if defined(__OpenBSD__) && defined(__sparc__) +# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__sparc__) # define SPARC -# define OPENBSD # define mach_type_known # endif -# if defined(__NetBSD__) && defined(m68k) -# define M68K -# define NETBSD -# define mach_type_known -# endif -# if defined(__NetBSD__) && defined(arm32) +# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(arm32) # define ARM32 -# define NETBSD # define mach_type_known # endif # if defined(vax) @@ -111,7 +116,7 @@ # define mach_type_known # endif # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \ - && !defined(__OpenBSD__) + && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) # define SPARC # define DRSNX # define mach_type_known @@ -147,7 +152,7 @@ # define I386 # define mach_type_known # endif -# if defined(LINUX) && (defined(__ia64__) || defined(__ia64)) +# if (defined(__FreeBSD__) || defined(LINUX)) && (defined(__ia64__) || defined(__ia64)) # define IA64 # define mach_type_known # endif @@ -165,7 +170,7 @@ # endif # if defined(__alpha) || defined(__alpha__) # define ALPHA -# if !defined(LINUX) +# if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) # define OSF1 /* a.k.a Digital Unix */ # endif # define mach_type_known @@ -192,6 +197,9 @@ # define POWERPC # define mach_type_known # endif +# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi)) && (defined(__powerpc) || defined(__ppc__) || defined(__ppc)) +# define POWERPC +# endif # if defined(NeXT) && defined(mc68000) # define M68K # define NEXT @@ -202,26 +210,10 @@ # define NEXT # define mach_type_known # endif -# if defined(__OpenBSD__) && defined(i386) -# define I386 -# define OPENBSD -# define mach_type_known -# endif -# if defined(__FreeBSD__) && defined(i386) +# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)) && (defined(i386) || defined(__i386__)) # define I386 -# define FREEBSD # define mach_type_known # endif -# if defined(__NetBSD__) && defined(i386) -# define I386 -# define NETBSD -# define mach_type_known -# endif -# if defined(bsdi) && defined(i386) -# define I386 -# define BSDI -# define mach_type_known -# endif # if !defined(mach_type_known) && defined(__386BSD__) # define I386 # define THREE86BSD @@ -318,7 +310,7 @@ /* (SUNOS4, SUNOS5, */ /* DRSNX variants) */ /* ALPHA ==> DEC Alpha */ - /* (OSF1 and LINUX variants) */ + /* (OSF1, BSD and LINUX variants) */ /* M88K ==> Motorola 88XX0 */ /* (CX_UX and DGUX) */ /* S370 ==> 370-like machine */ @@ -965,6 +957,31 @@ # define CPP_WORDSZ 64 # define MPROTECT_VDB # define DYNAMIC_LOADING +# endif +# ifdef FREEBSD +# define OS_TYPE "FREEBSD" +# define CPP_WORDSZ 64 +# define HEURISTIC2 +# define STACKBOTTOM ((ptr_t) 0x120000000) +/* # define DATASTART ((ptr_t) 0x140000000) */ +# define DATASTART GC_data_start +/* # define DYNAMIC_LOADING */ + extern int _end; +# define DATAEND (&_end) +# endif +# if defined(NETBSD) +# define OS_TYPE "NETBSD" +# define CPP_WORDSZ 64 +# define HEURISTIC2 + extern int _end; +# define DATAEND (&_end) +# endif +# if defined(OPENBSD) +# define OS_TYPE "OPENBSD" +# define CPP_WORDSZ 64 +# define HEURISTIC2 + extern int _end; +# define DATAEND (&_end) # endif # ifdef LINUX # define OS_TYPE "LINUX"