summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorhira <hira>2004-11-15 11:15:42 +0000
committerhira <hira>2004-11-15 11:15:42 +0000
commit2b9b1d174142e1441e75e59f439255543f6437d8 (patch)
treebbaedf0566d24a623f1f156b235370722a56a460 /x11
parentf03b28f4bfdc841220a7bd31d2f62ef17b85c8a1 (diff)
downloadpkgsrc-2b9b1d174142e1441e75e59f439255543f6437d8.tar.gz
Make this build on NetBSD/amd64. Patch provided by Nicolas Joly
on port-amd64@. OK'd by xtraeme@.
Diffstat (limited to 'x11')
-rw-r--r--x11/xorg-imake/distinfo6
-rw-r--r--x11/xorg-imake/patches/patch-ac73
-rw-r--r--x11/xorg-imake/patches/patch-ah19
-rw-r--r--x11/xorg-libs/distinfo10
-rw-r--r--x11/xorg-libs/patches/patch-ac73
-rw-r--r--x11/xorg-libs/patches/patch-ar15
-rw-r--r--x11/xorg-libs/patches/patch-as52
-rw-r--r--x11/xorg-libs/patches/patch-at13
-rw-r--r--x11/xorg-libs/patches/patch-au16
-rw-r--r--x11/xorg-libs/patches/patch-av12
-rw-r--r--x11/xorg-libs/patches/patch-aw40
11 files changed, 306 insertions, 23 deletions
diff --git a/x11/xorg-imake/distinfo b/x11/xorg-imake/distinfo
index 931f9df7f8d..4e602bcfd7d 100644
--- a/x11/xorg-imake/distinfo
+++ b/x11/xorg-imake/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2004/11/08 08:19:48 xtraeme Exp $
+$NetBSD: distinfo,v 1.7 2004/11/15 11:15:42 hira Exp $
SHA1 (X11R6.8.1-src1.tar.gz) = 027d16317e07d9df166c0176a1f28b2614f38cc9
Size (X11R6.8.1-src1.tar.gz) = 30562401 bytes
@@ -6,9 +6,9 @@ SHA1 (X11R6.8.1-src3.tar.gz) = e17afc90b0c43f4f40b2ff7410f4ff5d4297de28
Size (X11R6.8.1-src3.tar.gz) = 10014808 bytes
SHA1 (patch-aa) = f8d35ceb67df85ca04d9567d66bf99c5d292d322
SHA1 (patch-ab) = ae90c06b50d5d8b84054cc66beec0d0e3049d0aa
-SHA1 (patch-ac) = 90584e5732fb882f431afd69f6fd1c26c9d22bee
+SHA1 (patch-ac) = 938c15a6103d741aa29f1ec45e19be2284fb2a0b
SHA1 (patch-ad) = 7843332769ee47bc8a52a9adb1047b1a637af71b
SHA1 (patch-ae) = a06752ee9f55e64a407fac6fbde3547fd096c71d
SHA1 (patch-af) = 178d556fa11818420cd685308cf179ee5f6f7dac
SHA1 (patch-ag) = 4545d9fd50c2a7b6f5a04da330784eaf9a5373ad
-SHA1 (patch-ah) = 2d509b235d9b52317c435453db7d970e0ad54fd3
+SHA1 (patch-ah) = 6960406211ab12eff3044db477c22833c9eaa488
diff --git a/x11/xorg-imake/patches/patch-ac b/x11/xorg-imake/patches/patch-ac
index f5d2a5486c7..79907b5d248 100644
--- a/x11/xorg-imake/patches/patch-ac
+++ b/x11/xorg-imake/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:49:52 xtraeme Exp $
+$NetBSD: patch-ac,v 1.2 2004/11/15 11:15:42 hira Exp $
---- config/cf/NetBSD.cf.in.orig 2004-03-03 07:53:38.000000000 +0000
-+++ config/cf/NetBSD.cf.in 2004-03-03 07:54:59.000000000 +0000
-@@ -143,7 +143,7 @@
+--- config/cf/NetBSD.cf.in.orig 2004-08-15 09:03:36.000000000 +0900
++++ config/cf/NetBSD.cf.in 2004-11-03 16:54:50.000000000 +0900
+@@ -146,7 +146,7 @@
#define MkdirHierCmd mkdir -p
#undef CcCmd
@@ -11,7 +11,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:49:52 xtraeme Exp $
#ifndef DefaultCCOptions
#if defined(UseInstalled)
#define DefaultCCOptions /**/
-@@ -159,7 +159,7 @@
+@@ -162,7 +162,7 @@
#endif
#endif
@@ -20,7 +20,16 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:49:52 xtraeme Exp $
#define StandardCppOptions -traditional
#define StandardCppDefines /**/
#define PreProcessCmd CcCmd -E
-@@ -208,13 +208,7 @@
+@@ -191,7 +191,7 @@
+ * Disabled for NetBSD/vax until I figure out the scheme. --CS
+ */
+ #if ((OSMajorVersion > 0) && defined(i386Architecture)) || \
+- defined(PpcArchitecture)
++ defined(PpcArchitecture) || defined(AMD64Architecture)
+ # ifndef DoLoadableServer
+ # define DoLoadableServer YES
+ # endif
+@@ -211,13 +211,7 @@
#define HasWeakSymbols UseElfFormat
#ifdef i386Architecture
@@ -35,7 +44,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:49:52 xtraeme Exp $
# if OSMajorVersion < 1
# define ServerOSDefines XFree86ServerOSDefines -DXNO_SYSCONF
# else
-@@ -224,7 +218,7 @@
+@@ -227,7 +221,7 @@
# define ServerExtraSysLibs -li386
# endif
#else
@@ -44,3 +53,53 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:49:52 xtraeme Exp $
# if defined(SparcArchitecture)
# define ServerOSDefines -DDDXOSINIT
# elif defined(AlphaArchitecture)
+@@ -236,11 +230,17 @@
+ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+ # elif defined(PpcArchitecture)
+ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
++# elif defined(AMD64Architecture)
++# undef OptimizedCDebugFlags
++# define OptimizedCDebugFlags -O2
++# define ServerOSDefines XFree86ServerOSDefines
+ # else
+ # define ServerOSDefines /**/
+ # endif
+ # if defined(AlphaArchitecture)
+ # define ServerExtraSysLibs -lalpha
++# elif defined(AMD64Architecture)
++# define ServerExtraSysLibs -lx86_64
+ # else
+ # define ServerExtraSysLibs /**/
+ # endif
+@@ -280,6 +280,11 @@
+ # ifndef XFree86ConsoleDefines
+ # define XFree86ConsoleDefines -DWSCONS_SUPPORT
+ # endif
++#elif defined(AMD64Architecture)
++# define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
++# ifndef XFree86ConsoleDefines
++# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
++# endif
+ #else
+ # define ServerExtraDefines GccGasOption
+ #endif
+@@ -400,6 +405,10 @@
+ # endif /* MTRRBuiltin */
+ #endif /* i386Architecture */
+
++#if defined(AMD64Architecture)
++# define HasMTRRBuiltin YES
++#endif
++
+ /*
+ * agpgart support (NetBSD 1.5Y and up)
+ */
+@@ -588,7 +597,7 @@
+ # define BuildXInputLib YES
+ #endif
+
+-#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture)
++#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture) || defined(AMD64Architecture)
+ # include <xorg.cf>
+ #endif
+
diff --git a/x11/xorg-imake/patches/patch-ah b/x11/xorg-imake/patches/patch-ah
index 0bd30e3d0a6..54ca49272ba 100644
--- a/x11/xorg-imake/patches/patch-ah
+++ b/x11/xorg-imake/patches/patch-ah
@@ -1,8 +1,19 @@
-$NetBSD: patch-ah,v 1.1 2004/11/01 23:41:59 xtraeme Exp $
+$NetBSD: patch-ah,v 1.2 2004/11/15 11:15:42 hira Exp $
---- config/cf/Imake.cf.orig 2004-10-25 15:42:06.000000000 +0000
-+++ config/cf/Imake.cf 2004-10-22 15:29:33.000000000 +0000
-@@ -253,7 +253,23 @@
+--- config/cf/Imake.cf.orig 2004-08-12 06:14:01.000000000 +0900
++++ config/cf/Imake.cf 2004-11-09 20:01:31.000000000 +0900
+@@ -246,6 +246,10 @@
+ # define PpcArchitecture
+ # undef __powerpc__
+ # endif
++# ifdef __x86_64__
++# define AMD64Architecture
++# undef __x86_64__
++# endif
+ #endif /* NetBSD */
+
+ /* Systems based on kernel of NetBSD */
+@@ -253,7 +257,23 @@
#define KNetBSDArchitecture
#endif
diff --git a/x11/xorg-libs/distinfo b/x11/xorg-libs/distinfo
index da8db4552f1..cbc00d5f5e8 100644
--- a/x11/xorg-libs/distinfo
+++ b/x11/xorg-libs/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2004/10/20 14:33:30 reed Exp $
+$NetBSD: distinfo,v 1.7 2004/11/15 11:15:48 hira Exp $
SHA1 (X11R6.8.1-src1.tar.gz) = 027d16317e07d9df166c0176a1f28b2614f38cc9
Size (X11R6.8.1-src1.tar.gz) = 30562401 bytes
@@ -7,7 +7,7 @@ Size (X11R6.8.1-src2.tar.gz) = 5808949 bytes
SHA1 (X11R6.8.1-src3.tar.gz) = e17afc90b0c43f4f40b2ff7410f4ff5d4297de28
Size (X11R6.8.1-src3.tar.gz) = 10014808 bytes
SHA1 (patch-aa) = 009b7a2679ae98ebd7071e4fa6169c3401273ca1
-SHA1 (patch-ac) = 90584e5732fb882f431afd69f6fd1c26c9d22bee
+SHA1 (patch-ac) = 938c15a6103d741aa29f1ec45e19be2284fb2a0b
SHA1 (patch-ad) = 7843332769ee47bc8a52a9adb1047b1a637af71b
SHA1 (patch-ae) = a06752ee9f55e64a407fac6fbde3547fd096c71d
SHA1 (patch-ag) = 178d556fa11818420cd685308cf179ee5f6f7dac
@@ -20,3 +20,9 @@ SHA1 (patch-am) = a907d42a4d2a72871e165b99afdba81945d656c7
SHA1 (patch-an) = 513f8746bb66c954decdd7f2ca00888175c72834
SHA1 (patch-ao) = 3350204fda261f03ba69e475420f90141974c6b0
SHA1 (patch-ap) = 4a69e2df26e850ee33c1f7e6acc45ac205a46cd5
+SHA1 (patch-ar) = 869fd564e55cbc50cb7d535bec52b78bbabf3295
+SHA1 (patch-as) = 278f358daeb3c9757ebc6fba0f5a1bbc7f6d1cc5
+SHA1 (patch-at) = bc375171b6f0a8141621009767b5457962967112
+SHA1 (patch-au) = fd2bcdb1c37ce0cc748b0f5c2a12d226e4486d0d
+SHA1 (patch-av) = 99e9764ca1afdfb5882d62e453ccaea7dfa7f182
+SHA1 (patch-aw) = d305ea935ba10d443f9bfdcfc2c74bab5a03ba60
diff --git a/x11/xorg-libs/patches/patch-ac b/x11/xorg-libs/patches/patch-ac
index 9d583086c0c..693f72ddf28 100644
--- a/x11/xorg-libs/patches/patch-ac
+++ b/x11/xorg-libs/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:50:58 xtraeme Exp $
+$NetBSD: patch-ac,v 1.2 2004/11/15 11:15:48 hira Exp $
---- config/cf/NetBSD.cf.in.orig 2004-03-03 07:53:38.000000000 +0000
-+++ config/cf/NetBSD.cf.in 2004-03-03 07:54:59.000000000 +0000
-@@ -143,7 +143,7 @@
+--- config/cf/NetBSD.cf.in.orig 2004-08-15 09:03:36.000000000 +0900
++++ config/cf/NetBSD.cf.in 2004-11-03 16:54:50.000000000 +0900
+@@ -146,7 +146,7 @@
#define MkdirHierCmd mkdir -p
#undef CcCmd
@@ -11,7 +11,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:50:58 xtraeme Exp $
#ifndef DefaultCCOptions
#if defined(UseInstalled)
#define DefaultCCOptions /**/
-@@ -159,7 +159,7 @@
+@@ -162,7 +162,7 @@
#endif
#endif
@@ -20,7 +20,16 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:50:58 xtraeme Exp $
#define StandardCppOptions -traditional
#define StandardCppDefines /**/
#define PreProcessCmd CcCmd -E
-@@ -208,13 +208,7 @@
+@@ -191,7 +191,7 @@
+ * Disabled for NetBSD/vax until I figure out the scheme. --CS
+ */
+ #if ((OSMajorVersion > 0) && defined(i386Architecture)) || \
+- defined(PpcArchitecture)
++ defined(PpcArchitecture) || defined(AMD64Architecture)
+ # ifndef DoLoadableServer
+ # define DoLoadableServer YES
+ # endif
+@@ -211,13 +211,7 @@
#define HasWeakSymbols UseElfFormat
#ifdef i386Architecture
@@ -35,7 +44,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:50:58 xtraeme Exp $
# if OSMajorVersion < 1
# define ServerOSDefines XFree86ServerOSDefines -DXNO_SYSCONF
# else
-@@ -224,7 +218,7 @@
+@@ -227,7 +221,7 @@
# define ServerExtraSysLibs -li386
# endif
#else
@@ -44,3 +53,53 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/29 04:50:58 xtraeme Exp $
# if defined(SparcArchitecture)
# define ServerOSDefines -DDDXOSINIT
# elif defined(AlphaArchitecture)
+@@ -236,11 +230,17 @@
+ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+ # elif defined(PpcArchitecture)
+ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
++# elif defined(AMD64Architecture)
++# undef OptimizedCDebugFlags
++# define OptimizedCDebugFlags -O2
++# define ServerOSDefines XFree86ServerOSDefines
+ # else
+ # define ServerOSDefines /**/
+ # endif
+ # if defined(AlphaArchitecture)
+ # define ServerExtraSysLibs -lalpha
++# elif defined(AMD64Architecture)
++# define ServerExtraSysLibs -lx86_64
+ # else
+ # define ServerExtraSysLibs /**/
+ # endif
+@@ -280,6 +280,11 @@
+ # ifndef XFree86ConsoleDefines
+ # define XFree86ConsoleDefines -DWSCONS_SUPPORT
+ # endif
++#elif defined(AMD64Architecture)
++# define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
++# ifndef XFree86ConsoleDefines
++# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
++# endif
+ #else
+ # define ServerExtraDefines GccGasOption
+ #endif
+@@ -400,6 +405,10 @@
+ # endif /* MTRRBuiltin */
+ #endif /* i386Architecture */
+
++#if defined(AMD64Architecture)
++# define HasMTRRBuiltin YES
++#endif
++
+ /*
+ * agpgart support (NetBSD 1.5Y and up)
+ */
+@@ -588,7 +597,7 @@
+ # define BuildXInputLib YES
+ #endif
+
+-#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture)
++#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture) || defined(AMD64Architecture)
+ # include <xorg.cf>
+ #endif
+
diff --git a/x11/xorg-libs/patches/patch-ar b/x11/xorg-libs/patches/patch-ar
new file mode 100644
index 00000000000..1e3fb288f48
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-ar
@@ -0,0 +1,15 @@
+$NetBSD: patch-ar,v 1.1 2004/11/15 11:15:48 hira Exp $
+
+--- programs/Xserver/hw/xfree86/loader/Imakefile.orig 2004-11-03 17:25:44.000000000 +0900
++++ programs/Xserver/hw/xfree86/loader/Imakefile 2004-11-03 17:25:49.000000000 +0900
+@@ -40,6 +40,10 @@
+ ARCHDEFINES = -DDoMMAPedMerge -DMmapPageAlign
+ #endif
+
++#if defined(NetBSDArchitecture) && defined(AMD64Architecture)
++ARCHDEFINES = -DUseMMAP
++#endif
++
+ DEFINES = $(DBMALLOCDEFINE) $(DLOPENDEFINES) $(OS_DEFINES) $(COMPAT_DEFINES) \
+ $(SHM_DEFINES) $(FONTCACHE_DEFINES) $(ARCHDEFINES)
+
diff --git a/x11/xorg-libs/patches/patch-as b/x11/xorg-libs/patches/patch-as
new file mode 100644
index 00000000000..b626b6a30bb
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-as
@@ -0,0 +1,52 @@
+$NetBSD: patch-as,v 1.1 2004/11/15 11:15:48 hira Exp $
+
+--- programs/Xserver/hw/xfree86/loader/loader.c.orig 2004-11-03 17:26:20.000000000 +0900
++++ programs/Xserver/hw/xfree86/loader/loader.c 2004-11-03 17:29:53.000000000 +0900
+@@ -472,6 +472,13 @@
+ #ifdef UseMMAP
+ unsigned long ret;
+
++# if defined(__NetBSD__) && defined(__amd64__)
++# define LOADER_MMAP_AREA_SIZE (256*1024*1024)
++# define LOADER_MMAP_AREA_START ((2U*1024*1024*1024) - LOADER_MMAP_AREA_SIZE)
++ static char *mm_addr = (char *)LOADER_MMAP_AREA_START;
++# else
++ char *mm_addr = NULL;
++# endif
+ # ifdef MmapPageAlign
+ unsigned long pagesize;
+ unsigned long new_size;
+@@ -494,21 +501,31 @@
+ if ((new_off_bias + size) > new_size)
+ new_size += pagesize;
+ ret = (unsigned long)mmap(0, new_size, MMAP_PROT, MAP_PRIVATE
+-# ifdef __amd64__
++# if defined(__amd64__) && !defined(__NetBSD__)
+ | MAP_32BIT
+ # endif
+ , fd, new_off);
+ if (ret == -1)
+ FatalError("mmap() failed: %s\n", strerror(errno));
++
++# if defined(__amd64__) && defined(__NetBSD__)
++ mm_addr += new_size:
++# endif
++
+ return (void *)(ret + new_off_bias);
+ # else
+ ret = (unsigned long)mmap(0, size, MMAP_PROT, MAP_PRIVATE
+-# ifdef __amd64__
++# if defined(__amd64__) && !defined(__NetBSD__)
+ | MAP_32BIT
+ # endif
+ , fd, offset + offsetbias);
+ if (ret == -1)
+ FatalError("mmap() failed: %s\n", strerror(errno));
++
++# if defined(__amd64__) && defined(__NetBSD__)
++ mm_addr += (size + 4095) & ~4095;
++# endif
++
+ return (void *)ret;
+ # endif
+ #else
diff --git a/x11/xorg-libs/patches/patch-at b/x11/xorg-libs/patches/patch-at
new file mode 100644
index 00000000000..81255283dbe
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-at
@@ -0,0 +1,13 @@
+$NetBSD: patch-at,v 1.1 2004/11/15 11:15:48 hira Exp $
+
+--- programs/Xserver/hw/xfree86/os-support/bsd/Imakefile.orig 2004-11-03 17:32:01.000000000 +0900
++++ programs/Xserver/hw/xfree86/os-support/bsd/Imakefile 2004-11-03 17:32:07.000000000 +0900
+@@ -114,7 +114,7 @@
+ KMODOBJ = kmod_noop.o
+ #endif
+
+-#if defined(i386Architecture) || defined(ia64Architecture)
++#if defined(i386Architecture) || defined(ia64Architecture) || defined(AMD64Architecture)
+ RES_SRC=stdResource.c
+ RES_OBJ=stdResource.o
+ #else
diff --git a/x11/xorg-libs/patches/patch-au b/x11/xorg-libs/patches/patch-au
new file mode 100644
index 00000000000..a4b302bf63b
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-au
@@ -0,0 +1,16 @@
+$NetBSD: patch-au,v 1.1 2004/11/15 11:15:48 hira Exp $
+
+--- programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c.orig 2004-11-03 17:35:09.000000000 +0900
++++ programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c 2004-11-03 17:33:04.000000000 +0900
+@@ -44,6 +44,11 @@
+ #include <machine/mtrr.h>
+ #include <machine/sysarch.h>
+ #include <sys/queue.h>
++#ifdef __x86_64__
++#define i386_set_mtrr x86_64_set_mtrr
++#define i386_get_mtrr x86_64_get_mtrr
++#define i386_iopl x86_64_iopl
++#endif
+ #endif
+
+ #if defined(__OpenBSD__) && defined(__amd64__)
diff --git a/x11/xorg-libs/patches/patch-av b/x11/xorg-libs/patches/patch-av
new file mode 100644
index 00000000000..497309c156b
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-av
@@ -0,0 +1,12 @@
+$NetBSD: patch-av,v 1.1 2004/11/15 11:15:49 hira Exp $
+
+--- config/cf/xorg.cf.orig 2004-11-14 02:17:40.000000000 +0900
++++ config/cf/xorg.cf 2004-11-14 02:17:44.000000000 +0900
+@@ -1287,6 +1287,7 @@
+ #ifndef BuildScanpci
+ # if SystemV || SystemV4 || \
+ (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \
++ (defined(NetBSDArchitecture) && defined(AMD64Architecture)) || \
+ defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \
+ defined(OS2Architecture) || defined(GNUMachArchitecture)
+ # define BuildScanpci YES
diff --git a/x11/xorg-libs/patches/patch-aw b/x11/xorg-libs/patches/patch-aw
new file mode 100644
index 00000000000..73594c5b619
--- /dev/null
+++ b/x11/xorg-libs/patches/patch-aw
@@ -0,0 +1,40 @@
+$NetBSD: patch-aw,v 1.1 2004/11/15 11:15:49 hira Exp $
+
+--- config/cf/Imake.cf.orig 2004-08-12 06:14:01.000000000 +0900
++++ config/cf/Imake.cf 2004-11-09 03:52:53.000000000 +0900
+@@ -246,6 +246,10 @@
+ # define PpcArchitecture
+ # undef __powerpc__
+ # endif
++# ifdef __x86_64__
++# define AMD64Architecture
++# undef __x86_64__
++# endif
+ #endif /* NetBSD */
+
+ /* Systems based on kernel of NetBSD */
+@@ -253,7 +257,23 @@
+ #define KNetBSDArchitecture
+ #endif
+
+-#ifdef __FreeBSD__
++#ifdef __DragonFly__
++# define MacroIncludeFile <DragonFly.cf>
++# define MacroFile DragonFly.cf
++# undef __DragonFly__
++# define FreeBSDArchitecture
++# define KFreeBSDArchitecture
++# ifdef __i386__
++# define i386BsdArchitecture
++# define i386Architecture
++# undef i386
++# endif
++# ifdef __amd64__
++# define AMD64Architecture
++# undef __amd64__
++# undef __x86_64__
++# endif
++#elif defined __FreeBSD__
+ # define MacroIncludeFile <FreeBSD.cf>
+ # define MacroFile FreeBSD.cf
+ # undef __FreeBSD__