mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Update errno.
This commit is contained in:
@@ -81,7 +81,7 @@ fn void! File.seek(File *file, long offset, Seek seekMode = Seek.SET)
|
||||
{
|
||||
if (libc::fseek(file.file, (SeekIndex)(offset), (int)(seekMode)))
|
||||
{
|
||||
switch (libc::errno)
|
||||
switch (libc::errno())
|
||||
{
|
||||
case EBADF: return IoError.FILE_NOT_SEEKABLE!;
|
||||
case EINVAL: return IoError.FILE_INVALID_POSITION!;
|
||||
@@ -107,7 +107,7 @@ fn void! File.close(File *file) @inline
|
||||
{
|
||||
if (file.file && libc::fclose(file.file))
|
||||
{
|
||||
switch (libc::errno)
|
||||
switch (libc::errno())
|
||||
{
|
||||
case ECONNRESET:
|
||||
case EBADF: return IoError.FILE_NOT_VALID!;
|
||||
|
||||
@@ -160,7 +160,7 @@ enum Errno : ErrnoType
|
||||
ENOTRECOVERABLE = 131, /* State not recoverable */
|
||||
}
|
||||
|
||||
extern Errno errno;
|
||||
extern fn Errno errno(void);
|
||||
|
||||
define TerminateFunction = fn void();
|
||||
define CompareFunction = fn int(void*, void*);
|
||||
|
||||
Reference in New Issue
Block a user