Skip to content

Commit 5ba143e

Browse files
committed
avoid trying to translate microsoft's stdio.h inline functions
...for now. See #515
1 parent a3f741e commit 5ba143e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/compare_output.zig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ const tests = @import("tests.zig");
55

66
pub fn addCases(cases: *tests.CompareOutputContext) void {
77
cases.addC("hello world with libc",
8-
\\const c = @cImport(@cInclude("stdio.h"));
8+
\\const c = @cImport({
9+
\\ // See https://github.com/ziglang/zig/issues/515
10+
\\ @cDefine("_NO_CRT_STDIO_INLINE", "1");
11+
\\ @cInclude("stdio.h");
12+
\\});
913
\\pub export fn main(argc: c_int, argv: [*][*]u8) c_int {
1014
\\ _ = c.puts("Hello, world!");
1115
\\ return 0;

0 commit comments

Comments
 (0)