This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via 27165a8e4b9eff0e1cd5de40eae7db5741b33577 (commit) from 00bee4d9c4b31d29fbeb4678afed84fe93f5cd94 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 27165a8e4b9eff0e1cd5de40eae7db5741b33577 Author: slang <[email protected]> Date: Thu Aug 19 12:11:36 2010 -0500 fixes for gcc versions without -fdirectives-only. Also improved error messages in case gcc preprocessing fails ----------------------------------------------------------------------- Summary of changes: code/src/aesop/parser/CGen.lhs | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Diff of changes: diff --git a/code/src/aesop/parser/CGen.lhs b/code/src/aesop/parser/CGen.lhs index cc0ca67..a913373 100644 --- a/code/src/aesop/parser/CGen.lhs +++ b/code/src/aesop/parser/CGen.lhs @@ -72,10 +72,13 @@
removeFile errorFP return outFile ExitFailure e -> do
+> isOpen <- hIsOpen errorH +> errorH <- if not isOpen then openFile errorFP ReadMode else return errorH
errs <- hGetContents errorH
-> hClose errorH
removeFile errorFP trace ("Preprocessor failed with return code: " ++ (show e) ++ "\n" ++ errs ++ "\n\n") $ assert False $ return "dummy_file.c"
+> hClose errorH +> return "dummy_file.c"
type ReturnType = (CTypeSpec, [CDerivedDeclr]) @@ -138,7 +141,7 @@ Functions to generate AST objects from C template code mkParser :: [FilePath] -> [(String, String)] -> FilePath -> IO MacroParser mkParser idirs defines macheader = do types <- getTypeIdents idirs defines macheader -> result <- myCPP idirs defines Nothing ["-imacros", macheader, "-fdirectives-only", "-P"] (Left "\n") +> result <- myCPP idirs defines Nothing ["-imacros", macheader, "-E", "-dM", "-P"] (Left "\n") return $ MacroParser result types
doCPPWithParser :: MacroParser -> NodeInfo -> String -> IO String
hooks/post-receive -- Triton Repository