generate_linux_syscalls: Don't expose the helper constants on mips/mips64.

This commit is contained in:
Alex Rønne Petersen 2024-07-26 05:32:58 +02:00
parent 2747fca226
commit 1f9dcff747
No known key found for this signature in database

View File

@ -170,7 +170,7 @@ pub fn main() !void {
{ {
try writer.writeAll( try writer.writeAll(
\\pub const Mips = enum(usize) { \\pub const Mips = enum(usize) {
\\ pub const Linux = 4000; \\ const linux_base = 4000;
\\ \\
\\ \\
); );
@ -188,7 +188,7 @@ pub fn main() !void {
if (mem.startsWith(u8, name, "unused")) continue; if (mem.startsWith(u8, name, "unused")) continue;
const fixed_name = if (stdlib_renames.get(name)) |fixed| fixed else name; const fixed_name = if (stdlib_renames.get(name)) |fixed| fixed else name;
try writer.print(" {p} = Linux + {s},\n", .{ zig.fmtId(fixed_name), number }); try writer.print(" {p} = linux_base + {s},\n", .{ zig.fmtId(fixed_name), number });
} }
try writer.writeAll("};\n\n"); try writer.writeAll("};\n\n");
@ -196,7 +196,7 @@ pub fn main() !void {
{ {
try writer.writeAll( try writer.writeAll(
\\pub const Mips64 = enum(usize) { \\pub const Mips64 = enum(usize) {
\\ pub const Linux = 5000; \\ const linux_base = 5000;
\\ \\
\\ \\
); );
@ -213,7 +213,7 @@ pub fn main() !void {
const name = fields.next() orelse return error.Incomplete; const name = fields.next() orelse return error.Incomplete;
const fixed_name = if (stdlib_renames.get(name)) |fixed| fixed else name; const fixed_name = if (stdlib_renames.get(name)) |fixed| fixed else name;
try writer.print(" {p} = Linux + {s},\n", .{ zig.fmtId(fixed_name), number }); try writer.print(" {p} = linux_base + {s},\n", .{ zig.fmtId(fixed_name), number });
} }
try writer.writeAll("};\n\n"); try writer.writeAll("};\n\n");