[commit: ghc] master: Make the Windows-specific part of mkDerivedConstants.c conditional (72d3f4b)
Ian Lynagh
igloo at earth.li
Thu Sep 13 21:22:02 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/72d3f4b77eabd7c3023eedfdbaec9379bb791072
>---------------------------------------------------------------
commit 72d3f4b77eabd7c3023eedfdbaec9379bb791072
Author: Ian Lynagh <ian at well-typed.com>
Date: Thu Sep 13 16:10:32 2012 +0100
Make the Windows-specific part of mkDerivedConstants.c conditional
It is only generated when mode is Gen_Header; i.e. it's not used
in the compiler, only the RTS.
>---------------------------------------------------------------
includes/mkDerivedConstants.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index bb60df9..b9f4147 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -570,10 +570,15 @@ main(int argc, char *argv[])
struct_field(snEntry,addr);
#ifdef mingw32_HOST_OS
- struct_size(StgAsyncIOResult);
- struct_field(StgAsyncIOResult, reqID);
- struct_field(StgAsyncIOResult, len);
- struct_field(StgAsyncIOResult, errCode);
+ /* Note that this conditional part only affects the C headers.
+ That's important, as it means we get the same PlatformConstants
+ type on all platforms. */
+ if (mode == Gen_Header) {
+ struct_size(StgAsyncIOResult);
+ struct_field(StgAsyncIOResult, reqID);
+ struct_field(StgAsyncIOResult, len);
+ struct_field(StgAsyncIOResult, errCode);
+ }
#endif
switch (mode) {
More information about the Cvs-ghc
mailing list