Windows bvild failure

Duncan Coutts duncan at well-typed.com
Mon Oct 31 12:44:32 CET 2011


On Sat, 2011-10-29 at 11:01 +0000, Simon Peyton-Jones wrote:
> Windows build failure in HEAD
> 
> "inplace/bin/ghc-stage1.exe" -optc-Wall -optc-Werror -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\"   -H32m -O -Wall -Werror -H64m -O0 -Iincludes -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts  -dcmm-lint      -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen            -optc-O2   -c rts/RtsFlags.c -o rts/dist/build/RtsFlags.o
> cc1.exe: warnings being treated as errors
> rts\RtsFlags.c: In function 'checkSuid':

And if you hit a problem in rts/win32/GetTime.c then let me know.


commit d518e8f1a6f111575aba37bb0b0ba00168ad7fcd
Author: Duncan Coutts <duncan at well-typed.com>
Date:   Mon Oct 31 11:39:15 2011 +0000

    Fix recent rts flags changes on windows
    
    I naively assumed that mingw would not have unistd.h or sys/types
    but it has both, yet does not have getuid() and friends.

diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index c3784ad..bd2bf67 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -536,7 +536,7 @@ void setupRtsFlags (int *argc, char *argv[])
 
 static void checkSuid(RtsOptsEnabledEnum enabled)
 {
-#if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_TYPES_H)
+#if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_TYPES_H) && !
defined(mingw32_HOST_OS)
     if (enabled == RtsOptsSafeOnly) {
        /* This doesn't cover linux/posix capabilities like
CAP_DAC_OVERRIDE,
           we'd have to link with -lcap for that. */







More information about the Cvs-ghc mailing list