From: Roland McGrath Date: Thu, 28 Oct 1993 21:47:13 +0000 (+0000) Subject: Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~2~ X-Git-Tag: glibc-2.16-ports-before-merge~4219 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5412bc1b048289f0951232fb9d7cc7e09dae3522;p=thirdparty%2Fglibc.git Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~2~ --- diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S index 9927c1a2f96..43682f3e0db 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S +++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S @@ -21,13 +21,23 @@ Cambridge, MA 02139, USA. */ ENTRY(syscall_error) /* If it was a syscall that got interrupted, but can - be restarted, drop ERESTART in. */ + be restarted, drop EINTR in. */ cmp %o0, ERESTART be,a notint mov EINTR, %o0 - /* Store it in errno... */ -notint: sethi %hi(C_SYMBOL_NAME(errno)), %g1 +notint: +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmp %o0, EWOULDBLOCK_sys + be,a notblock + mov EAGAIN, %o0 +#endif + +notblock:/* Store it in errno... */ + sethi %hi(C_SYMBOL_NAME(errno)), %g1 st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))] /* And just kick back a -1. */