Commit 2a0d3678 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Shielding with #ifdef __unix__ for include files that don't exist in deaf and...

Shielding with #ifdef __unix__ for include files that don't exist in deaf and blind embedded systems
parent 6665e063
......@@ -100,11 +100,13 @@ class ASynchronousToolGlueGenerator:
ID = re.sub(r'[^A-Za-z0-9_]', '_', ID).upper()
self.C_HeaderFile.write("#ifndef __%s_H__\n" % ID)
self.C_HeaderFile.write("#define __%s_H__\n\n" % ID)
self.C_HeaderFile.write("#ifdef __unix__\n")
self.C_HeaderFile.write("#include <stdlib.h> /* for size_t */\n")
self.C_HeaderFile.write("\n")
self.C_SourceFile.write("#include <stdio.h>\n")
self.C_SourceFile.write("#include <string.h>\n\n")
self.C_SourceFile.write("#include <assert.h>\n\n")
self.C_SourceFile.write("#endif\n\n")
self.C_SourceFile.write("#include \"%s\"\n\n" % outputCheaderFilename)
self.HeadersOnStartup(asnFile, outputDir, maybeFVname)
......
......@@ -172,9 +172,11 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
self.C_HeaderFile.write("#include <stdlib.h> /* for size_t */\n")
self.C_HeaderFile.write("\n")
self.C_SourceFile.write("#ifdef __unix__\n")
self.C_SourceFile.write("#include <stdio.h>\n")
self.C_SourceFile.write("#include <string.h>\n\n")
self.C_SourceFile.write("#include <assert.h>\n\n")
self.C_SourceFile.write("#endif\n")
self.C_SourceFile.write("#include \"%s\"\n" % outputCheaderFilename)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment