Added placeholders for type casts
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
bind(socket int, port int) -> int {
|
||||
bind(socket int, port uint16) -> int {
|
||||
addr := new(sys.sockaddr_in)
|
||||
addr.sin_family = 2
|
||||
addr.sin_port = htons(port)
|
||||
|
@ -1,12 +1,12 @@
|
||||
read(fd int64, buffer *byte, length int64) -> int64 {
|
||||
read(fd int, buffer *byte, length int) -> int {
|
||||
fd = kernel32.GetStdHandle(-10 - fd)
|
||||
kernel32.ReadConsole(fd, buffer, length, 0)
|
||||
kernel32.ReadConsole(fd, buffer, uint32(length), 0)
|
||||
return length
|
||||
}
|
||||
|
||||
write(fd int64, buffer *byte, length int64) -> int64 {
|
||||
write(fd int, buffer *byte, length int) -> int {
|
||||
fd = kernel32.GetStdHandle(-10 - fd)
|
||||
kernel32.WriteConsoleA(fd, buffer, length, 0)
|
||||
kernel32.WriteConsoleA(fd, buffer, uint32(length), 0)
|
||||
return length
|
||||
}
|
||||
|
||||
|
@ -12,10 +12,8 @@ const clone {
|
||||
}
|
||||
|
||||
create(func *any) -> int {
|
||||
size := 4096
|
||||
stack := sys.mmap(0, size, 0x1|0x2, 0x02|0x20|0x100|0x20000)
|
||||
stack += size
|
||||
stack -= 8
|
||||
stack := sys.mmap(0, 4096, 0x1|0x2, 0x02|0x20|0x100)
|
||||
stack += 4096 - 8
|
||||
store(stack, 8, core.exit)
|
||||
stack -= 8
|
||||
store(stack, 8, func)
|
||||
|
Reference in New Issue
Block a user