| author | |
| committer | |
| log | 344db9e26bfb7a966cb99d73fa13c7d6845c2ce9 |
| tree | d0f7f7c0783719f396298b86c67aa08e911ac2b2 |
| parent | 7e548af8b1527d2d04de1c12df9bf8afd1ad23ea |
| signature |
4 files changed, 16 insertions(+), 1 deletions(-)
lib/std/Build/Step/ConfigHeader.zig+1-1| ... | @@ -286,7 +286,7 @@ fn render_autoconf( | ... | @@ -286,7 +286,7 @@ fn render_autoconf( |
| 286 | try output.appendSlice("\n"); | 286 | try output.appendSlice("\n"); |
| 287 | continue; | 287 | continue; |
| 288 | } | 288 | } |
| 289 | const name = it.rest(); | 289 | const name = it.next().?; |
| 290 | const index = values.getIndex(name) orelse { | 290 | const index = values.getIndex(name) orelse { |
| 291 | try step.addError("{s}:{d}: error: unspecified config header value: '{s}'", .{ | 291 | try step.addError("{s}:{d}: error: unspecified config header value: '{s}'", .{ |
| 292 | src_path, line_index + 1, name, | 292 | src_path, line_index + 1, name, |
test/standalone/config_header/build.zig+5| ... | @@ -12,6 +12,11 @@ pub fn build(b: *std.Build) void { | ... | @@ -12,6 +12,11 @@ pub fn build(b: *std.Build) void { |
| 12 | .SOME_TEN = 10, | 12 | .SOME_TEN = 10, |
| 13 | .SOME_ENUM_LITERAL = .@"test", | 13 | .SOME_ENUM_LITERAL = .@"test", |
| 14 | .SOME_STRING = "test", | 14 | .SOME_STRING = "test", |
| 15 | |||
| 16 | .PREFIX_SPACE = null, | ||
| 17 | .PREFIX_TAB = null, | ||
| 18 | .POSTFIX_SPACE = null, | ||
| 19 | .POSTFIX_TAB = null, | ||
| 15 | }, | 20 | }, |
| 16 | ); | 21 | ); |
| 17 | 22 |
test/standalone/config_header/config.h+5| ... | @@ -15,3 +15,8 @@ int foo(); | ... | @@ -15,3 +15,8 @@ int foo(); |
| 15 | // Used twice | 15 | // Used twice |
| 16 | #define SOME_TRUE 1 | 16 | #define SOME_TRUE 1 |
| 17 | 17 | ||
| 18 | /* #undef PREFIX_SPACE */ | ||
| 19 | /* #undef PREFIX_TAB */ | ||
| 20 | /* #undef POSTFIX_SPACE */ | ||
| 21 | /* #undef POSTFIX_TAB */ | ||
| 22 |
test/standalone/config_header/config.h.in+5| ... | @@ -13,3 +13,8 @@ int foo(); | ... | @@ -13,3 +13,8 @@ int foo(); |
| 13 | 13 | ||
| 14 | // Used twice | 14 | // Used twice |
| 15 | #undef SOME_TRUE | 15 | #undef SOME_TRUE |
| 16 | |||
| 17 | #undef PREFIX_SPACE | ||
| 18 | #undef	PREFIX_TAB | ||
| 19 | #undef POSTFIX_SPACE | ||
| 20 | #undef POSTFIX_TAB	 |