mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fixes to the socket functions. Improved output when pointer is out of range. Better error when casting to a distinct fails.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
module libc @if(env::POSIX);
|
||||
|
||||
extern fn isz recv(Fd socket, void *buffer, usz length, CInt flags);
|
||||
extern fn isz send(Fd socket, void *buffer, usz length, CInt flags);
|
||||
|
||||
extern fn void* dlopen(ZString path, int flags);
|
||||
extern fn CInt dlclose(void*);
|
||||
@@ -188,3 +190,4 @@ struct Termios {
|
||||
Speed c_ispeed;
|
||||
Speed c_ospeed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module libc @if(env::WIN32);
|
||||
|
||||
import std::os::win32;
|
||||
|
||||
extern fn CFile __acrt_iob_func(CInt c);
|
||||
extern fn CInt _close(Fd fd); def close = _close;
|
||||
@@ -15,11 +15,13 @@ extern fn Time_t _mkgmtime64(Tm* timeptr); def timegm = _mkgmtime64;
|
||||
extern fn Time_t _mktime64(Tm *timeptr); def mktime = _mktime64;
|
||||
extern fn usz _msize(void* ptr);
|
||||
extern fn CInt _read(Fd fd, void* buffer, CUInt buffer_size);
|
||||
extern fn CInt _setjmp(void* frameptr, JmpBuf* buffer) @if(env::WIN32);
|
||||
extern fn CInt _setjmp(void* frameptr, JmpBuf* buffer);
|
||||
extern fn CFile _wfopen(WString, WString);
|
||||
extern fn CFile _wfreopen(WString, WString, CFile);
|
||||
extern fn CInt _write(Fd fd, void* buffer, CUInt count);
|
||||
extern fn CInt _wremove(WString);
|
||||
extern fn int recv(Win32_SOCKET s, void* buf, int len, int flags);
|
||||
extern fn int send(Win32_SOCKET s, void* buf, int len, int flags);
|
||||
|
||||
struct SystemInfo
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user