[commit: packages/unix] master, safe710fixes, safe710fixes-again, safefixes710again: fix _FILE_OFFSET_BITS redefined warning on Solaris/x86 (1b53296)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 15:50:13 UTC 2015
Repository : ssh://git@git.haskell.org/unix
On branches: master,safe710fixes,safe710fixes-again,safefixes710again
Link : http://ghc.haskell.org/trac/ghc/changeset/1b53296fba0d36f6144c7797e96bf95b33a4cd7e/unix
>---------------------------------------------------------------
commit 1b53296fba0d36f6144c7797e96bf95b33a4cd7e
Author: Karel Gardas <karel.gardas at centrum.cz>
Date: Fri Jul 25 23:42:00 2014 +0200
fix _FILE_OFFSET_BITS redefined warning on Solaris/x86
The issue is that sys/types.h header on Solaris includes somehow
/usr/include/sys/feature_tests.h which tests if _FILE_OFFSET_BITS
is defined and if not, then it defines it to 32 if we're compiling
32 bit code (x86). This is simply wrong since we'd like to have it
defined to 64. The issue is solved by including HsUnixConfig.h first
which defines _FILE_OFFSET_BITS to 64 and feature_tests.h is later
OK with that.
>---------------------------------------------------------------
1b53296fba0d36f6144c7797e96bf95b33a4cd7e
System/Posix/SharedMem.hsc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/System/Posix/SharedMem.hsc b/System/Posix/SharedMem.hsc
index 1d7a80a..c85e4b7 100644
--- a/System/Posix/SharedMem.hsc
+++ b/System/Posix/SharedMem.hsc
@@ -19,12 +19,12 @@ module System.Posix.SharedMem
(ShmOpenFlags(..), shmOpen, shmUnlink)
where
+#include "HsUnix.h"
+
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
-#include "HsUnix.h"
-
import System.Posix.Types
#if defined(HAVE_SHM_OPEN) || defined(HAVE_SHM_UNLINK)
import Foreign.C
More information about the ghc-commits
mailing list