compiler: apply name infix on include filenames

This fixes #include output when $C.nameinfix is used.
This commit is contained in:
David Lamparter 2016-07-19 15:21:56 +02:00
parent da663f83ef
commit c322bc9618

View file

@ -1308,7 +1308,7 @@ int main() {
for (j = 0; j < capn_len(file_req.imports); j++) { for (j = 0; j < capn_len(file_req.imports); j++) {
struct CodeGeneratorRequest_RequestedFile_Import im; struct CodeGeneratorRequest_RequestedFile_Import im;
get_CodeGeneratorRequest_RequestedFile_Import(&im, file_req.imports, j); get_CodeGeneratorRequest_RequestedFile_Import(&im, file_req.imports, j);
str_addf(&HDR, "#include \"%s.h\"\n", im.name.str); str_addf(&HDR, "#include \"%s%s.h\"\n", im.name.str, nameinfix);
} }
str_addf(&HDR, "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); str_addf(&HDR, "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n");