Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1266 from ziglang/self-hosted-libc-hello-world
Self hosted libc hello world
- Loading branch information
Showing
46 changed files
with
5,624 additions
and
1,204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
pub const CInt = struct { | ||
id: Id, | ||
zig_name: []const u8, | ||
c_name: []const u8, | ||
is_signed: bool, | ||
|
||
pub const Id = enum { | ||
Short, | ||
UShort, | ||
Int, | ||
UInt, | ||
Long, | ||
ULong, | ||
LongLong, | ||
ULongLong, | ||
}; | ||
|
||
pub const list = []CInt{ | ||
CInt{ | ||
.id = Id.Short, | ||
.zig_name = "c_short", | ||
.c_name = "short", | ||
.is_signed = true, | ||
}, | ||
CInt{ | ||
.id = Id.UShort, | ||
.zig_name = "c_ushort", | ||
.c_name = "unsigned short", | ||
.is_signed = false, | ||
}, | ||
CInt{ | ||
.id = Id.Int, | ||
.zig_name = "c_int", | ||
.c_name = "int", | ||
.is_signed = true, | ||
}, | ||
CInt{ | ||
.id = Id.UInt, | ||
.zig_name = "c_uint", | ||
.c_name = "unsigned int", | ||
.is_signed = false, | ||
}, | ||
CInt{ | ||
.id = Id.Long, | ||
.zig_name = "c_long", | ||
.c_name = "long", | ||
.is_signed = true, | ||
}, | ||
CInt{ | ||
.id = Id.ULong, | ||
.zig_name = "c_ulong", | ||
.c_name = "unsigned long", | ||
.is_signed = false, | ||
}, | ||
CInt{ | ||
.id = Id.LongLong, | ||
.zig_name = "c_longlong", | ||
.c_name = "long long", | ||
.is_signed = true, | ||
}, | ||
CInt{ | ||
.id = Id.ULongLong, | ||
.zig_name = "c_ulonglong", | ||
.c_name = "unsigned long long", | ||
.is_signed = false, | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.