diff options
author | Ian Lynagh <igloo@earth.li> | 2012-02-11 13:33:01 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-02-11 13:33:01 +0000 |
commit | 91fe8175711d31332cdc9de23f56f51490269e7c (patch) | |
tree | c52b54086893a96b71658942c1aaf10d69f8be45 | |
parent | 5aaffa6a1b8dadd6a867e4cb98a5a0b7b0452528 (diff) | |
download | haskell-91fe8175711d31332cdc9de23f56f51490269e7c.tar.gz |
Add dragonfly support; based on a patch from Goetz Isenmann
-rw-r--r-- | aclocal.m4 | 3 | ||||
-rw-r--r-- | compiler/utils/Platform.hs | 20 | ||||
-rw-r--r-- | rts/PosixSource.h | 2 |
3 files changed, 15 insertions, 10 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 9447a47813..3e1cbe0849 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -211,6 +211,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], freebsd) test -z "[$]2" || eval "[$]2=OSFreeBSD" ;; + dragonfly) + test -z "[$]2" || eval "[$]2=OSDragonFly" + ;; kfreebsdgnu) test -z "[$]2" || eval "[$]2=OSKFreeBSD" ;; diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 7045f4b521..66f51e64e6 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -54,6 +54,7 @@ data OS | OSSolaris2 | OSMinGW32 | OSFreeBSD + | OSDragonFly | OSOpenBSD | OSNetBSD | OSKFreeBSD @@ -81,15 +82,16 @@ target32Bit p = platformWordSize p == 4 -- | This predicates tells us whether the OS supports ELF-like shared libraries. osElfTarget :: OS -> Bool -osElfTarget OSLinux = True -osElfTarget OSFreeBSD = True -osElfTarget OSOpenBSD = True -osElfTarget OSNetBSD = True -osElfTarget OSSolaris2 = True -osElfTarget OSDarwin = False -osElfTarget OSMinGW32 = False -osElfTarget OSKFreeBSD = True -osElfTarget OSUnknown = False +osElfTarget OSLinux = True +osElfTarget OSFreeBSD = True +osElfTarget OSDragonFly = True +osElfTarget OSOpenBSD = True +osElfTarget OSNetBSD = True +osElfTarget OSSolaris2 = True +osElfTarget OSDarwin = False +osElfTarget OSMinGW32 = False +osElfTarget OSKFreeBSD = True +osElfTarget OSUnknown = False -- Defaulting to False is safe; it means don't rely on any -- ELF-specific functionality. It is important to have a default for -- portability, otherwise we have to answer this question for every diff --git a/rts/PosixSource.h b/rts/PosixSource.h index d139dd50af..56e08abb0e 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -11,7 +11,7 @@ #include <ghcplatform.h> -#if defined(freebsd_HOST_OS) +#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) #define _POSIX_C_SOURCE 200112L #define _XOPEN_SOURCE 600 #else |