Commit 91fe8175 authored by Ian Lynagh's avatar Ian Lynagh

Add dragonfly support; based on a patch from Goetz Isenmann

parent 5aaffa6a
......@@ -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"
;;
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment