mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.Build.Step.ConfigHeader: skip trailing whitespace in autoconf header
This commit is contained in:
parent
7e548af8b1
commit
344db9e26b
@ -286,7 +286,7 @@ fn render_autoconf(
|
|||||||
try output.appendSlice("\n");
|
try output.appendSlice("\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const name = it.rest();
|
const name = it.next().?;
|
||||||
const index = values.getIndex(name) orelse {
|
const index = values.getIndex(name) orelse {
|
||||||
try step.addError("{s}:{d}: error: unspecified config header value: '{s}'", .{
|
try step.addError("{s}:{d}: error: unspecified config header value: '{s}'", .{
|
||||||
src_path, line_index + 1, name,
|
src_path, line_index + 1, name,
|
||||||
|
|||||||
@ -12,6 +12,11 @@ pub fn build(b: *std.Build) void {
|
|||||||
.SOME_TEN = 10,
|
.SOME_TEN = 10,
|
||||||
.SOME_ENUM_LITERAL = .@"test",
|
.SOME_ENUM_LITERAL = .@"test",
|
||||||
.SOME_STRING = "test",
|
.SOME_STRING = "test",
|
||||||
|
|
||||||
|
.PREFIX_SPACE = null,
|
||||||
|
.PREFIX_TAB = null,
|
||||||
|
.POSTFIX_SPACE = null,
|
||||||
|
.POSTFIX_TAB = null,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -15,3 +15,8 @@ int foo();
|
|||||||
// Used twice
|
// Used twice
|
||||||
#define SOME_TRUE 1
|
#define SOME_TRUE 1
|
||||||
|
|
||||||
|
/* #undef PREFIX_SPACE */
|
||||||
|
/* #undef PREFIX_TAB */
|
||||||
|
/* #undef POSTFIX_SPACE */
|
||||||
|
/* #undef POSTFIX_TAB */
|
||||||
|
|
||||||
|
|||||||
@ -13,3 +13,8 @@ int foo();
|
|||||||
|
|
||||||
// Used twice
|
// Used twice
|
||||||
#undef SOME_TRUE
|
#undef SOME_TRUE
|
||||||
|
|
||||||
|
#undef PREFIX_SPACE
|
||||||
|
#undef PREFIX_TAB
|
||||||
|
#undef POSTFIX_SPACE
|
||||||
|
#undef POSTFIX_TAB
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user