Fri Jul 16 15:46:55 PDT 2010 ezy...@mit.edu * Work-around Language.C's inability to handle CRLF newlines.
New patches:
[Work-around Language.C's inability to handle CRLF newlines. ezy...@mit.edu**20100716224655 Ignore-this: ade8f34c1f486967743c20a6f9b51a85 ] { hunk ./src/Main.hs 559 let newHeader = outFName <.> chssuffix <.> hsuffix newHeaderFile = outDir </> newHeader preprocFile = FilePath.takeBaseName outFName <.> isuffix + tmpPreprocFile= FilePath.takeBaseName outFName <.> "tmp" <.> isuffix CIO.writeFile newHeaderFile $ concat $ [ "#include \"" ++ headerFile ++ "\"\n" | headerFile <- headerFiles ] hunk ./src/Main.hs 581 let args = cppOpts ++ [newHeaderFile] tracePreproc (unwords (cpp:args)) exitCode <- CIO.liftIO $ do - preprocHnd <- openFile preprocFile WriteMode + preprocHnd <- openFile tmpPreprocFile WriteMode cppproc <- runProcess cpp args Nothing Nothing Nothing (Just preprocHnd) Nothing waitForProcess cppproc hunk ./src/Main.hs 588 case exitCode of CIO.ExitFailure _ -> fatal "Error during preprocessing custom header file" _ -> return () + + -- convert result to Unix newlines to work around Language.C bug + CIO.readFile tmpPreprocFile >>= CIO.writeFile preprocFile + CIO.removeFile tmpPreprocFile + -- -- load and analyse the C header file -- hunk ./src/System/CIO.hs 88 -- As an workaround, use latin1 encoding for the moment: IO.hSetEncoding hnd IO.latin1 #endif + IO.hSetNewlineMode hnd IO.NewlineMode { IO.inputNL = IO.CRLF, IO.outputNL = IO.LF } return hnd hClose :: IO.Handle -> PreCST e s () } Context: [Deprecate unused functions in the C2HS source module Duncan Coutts <dun...@haskell.org>**20100608003144 Ignore-this: 97a58b35219b3235cf4bccd11c49fc3e It should not be a general provider of utility functions. It should just be for marshaling functions that are needed by code generated by c2hs. ] [Generate standard marshalers for int, float and bool Duncan Coutts <dun...@haskell.org>**20100608000741 Ignore-this: 302d7c98b3de571ed8f795c6272f9db8 Rather than non-stanard aliases from the annoying C2HS module. ] [Remove redundant vim modeline which apparently confuses emacs Duncan Coutts <dun...@haskell.org>**20100530224328 Ignore-this: 3d6c5aae17fb80fc690ebee4749d0acc Also add ghc-options: -fwarn-tabs ] [Extend the sizeof test to do alignment too Duncan Coutts <dun...@haskell.org>**20100423174026 Ignore-this: 46730bba6e9c3b9a3de6f2049a0b08a6 The bitfield size tests fail. See ticket #10. ] [Rename "alignment" keyword to "alignof" Duncan Coutts <dun...@haskell.org>**20100423173753 Ignore-this: 4b3a8530eb5d65245c5b15b36069fe71 To match sizeof, and the GNU C __alignof__ keyword. Also fix implementation to return the alignment rather than size. ] [alignment keyword support r...@gamr7.com**20091022153809 Ignore-this: 6bc67ccada198cb9979a0ed04a003839 ] [TAG 0.16.2 Duncan Coutts <dun...@haskell.org>**20100422171301 Ignore-this: 961a5a4883231850ff0f7248beb1b439 ] [Bump version number Duncan Coutts <dun...@haskell.org>**20100422171232 Ignore-this: 8b89818bc1879f0403f9ba3f90bc07fa Will use even numbers for releases. ] [Specify GPL version number 2 in .cabal metadata Duncan Coutts <dun...@haskell.org>**20100422171209 Ignore-this: 5088233f62c4286e17fe0d6267346c9d ] [Fix a few warnings Duncan Coutts <dun...@haskell.org>**20100422171022 Ignore-this: c3889d1a59cccc206c6a301db97633ce ] [Remove a couple old comments that are no longer applicable Duncan Coutts <dun...@haskell.org>**20100419224920 Ignore-this: 17026945fea02ec85ee1fa48fc2d86c5 ] [Bump version number Duncan Coutts <dun...@haskell.org>**20100419224828 Ignore-this: 687f3af0846f640430e5e9bf33c39d96 ] [Specify source repository in .cabal file Duncan Coutts <dun...@haskell.org>**20100419224706 Ignore-this: d9370e4b60aa8f27b761656c48c051ad Requires Cabal 1.6, also allows using file globs for extra source files ] [Workaround .chs lexer problem by using latin1 encoding Duncan Coutts <dun...@haskell.org>**20100419224401 Ignore-this: 6714eb66dcda0e766b4e933f082ce839 The .chs lexer cannot handle chars > 255 so as a workaround force the file I/O to use latin1 encoding. This becomes a problem with base-4.2 since by default it uses locale encoding where preciously it used only latin1 encoding. Eventually we should move to .chs files being utf8 since .hs files are utf8. ] [Improve error message formatting in some cases Duncan Coutts <dun...@haskell.org>**20100419224223 Ignore-this: 311b937efd9ce34897ed58f8ca84b44e Workaround for wierd Show instance for CError from language-c ] [Fix printing of FFI foreign entity strings to not have leading whitespace Duncan Coutts <dun...@haskell.org>**20100419223932 Ignore-this: 3ca3ce15b0efb62e5560dc13de293253 Early betas of ghc-6.12 could not parse these. Fixed in 6.12.1 I think but still worth making the output prettier. ] [Fix line number info in error messages about C function types Duncan Coutts <dun...@haskell.org>**20100419223032 Ignore-this: a3e40d7ae3ae51613505289d0ab4ad8f Preserve source positions when constructing attributes while analysing C function declarations. In particular this fixed the error messages for binding long double C types. ] [Workaround the lack of CLDouble support in ghc/base Duncan Coutts <dun...@haskell.org>**20100419134939 Ignore-this: 29920798e12fdc8dbcef328a0d94af9e If users try to bind to functions that use "long double" they will get an error message about the type not being supported. ] [TAG 0.16.0 Duncan Coutts <dun...@haskell.org>**20090228132823] Patch bundle hash: 351e772d5504c316e42ca6434eb445700bdde95a
_______________________________________________ C2hs mailing list C2hs@haskell.org http://www.haskell.org/mailman/listinfo/c2hs