From 5412bc1b048289f0951232fb9d7cc7e09dae3522 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1993 21:47:13 +0000 Subject: [PATCH] Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~2~ --- sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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. */ -- 2.47.3