2005-03-22 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: For arc, set -DREENTRANT_SYSCALLS_PROVIDED flag on. * libc/sys/arc/syscalls.c: Change functions to use __errno_r rather than errno.
This commit is contained in:
parent
eb35705027
commit
859c94e8de
|
@ -1,3 +1,9 @@
|
|||
2005-03-22 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* configure.host: For arc, set -DREENTRANT_SYSCALLS_PROVIDED flag on.
|
||||
* libc/sys/arc/syscalls.c: Change functions to use __errno_r rather
|
||||
than errno.
|
||||
|
||||
2005-03-22 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* libc/include/machine/_types.h: Make trivial change to comment to
|
||||
|
|
|
@ -502,6 +502,9 @@ case "${host}" in
|
|||
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
||||
fi
|
||||
;;
|
||||
arc*)
|
||||
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
|
||||
;;
|
||||
avr*)
|
||||
newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
||||
;;
|
||||
|
|
|
@ -15,7 +15,7 @@ _read_r (struct _reent *r, int fd, void *buf, size_t nbytes)
|
|||
|
||||
SYSCALL (SYS_read, rc, err, fd, buf, nbytes);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)
|
|||
|
||||
SYSCALL (SYS_write, rc, err, fd, buf, nbytes);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ _open_r (struct _reent *r, const char *buf, int flags, int mode)
|
|||
#endif
|
||||
|
||||
SYSCALL (SYS_open, rc, err, buf, flags, mode);
|
||||
errno = err;
|
||||
if (err)
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -59,7 +60,7 @@ _close_r (struct _reent *r, int fd)
|
|||
|
||||
SYSCALL (SYS_close, rc, err, fd, 0, 0);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -71,7 +72,7 @@ _lseek_r (struct _reent *r, int fd, off_t offset, int whence)
|
|||
|
||||
SYSCALL (SYS_lseek, rc, err, fd, offset, whence);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -82,7 +83,7 @@ _fstat_r (struct _reent *r, int fd, struct stat *buf)
|
|||
|
||||
SYSCALL (SYS_fstat, rc, err, fd, buf, 0);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -125,6 +126,6 @@ _kill_r (struct _reent *r, int pid, int sig)
|
|||
|
||||
SYSCALL (SYS_kill, rc, err, pid, sig, 0);
|
||||
if (err)
|
||||
errno = err;
|
||||
__errno_r (r) = err;
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue