From c501fb74cffe9d4bd4298fc7a9b0c734c02c4682 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sat, 13 Aug 1994 14:00:26 +0000 Subject: [PATCH] Fixed problem with returning -1 on error when the return value is a long long. Done by plugging both eax and edx with -1. This will clobber edx unnecessarily when the return value is only 32bit...though probably always an okay thing to do, it could stand a better fix. This was the cause of gawk being broken (boy was THAT ever a subtle bug!!!). --- lib/libc/amd64/sys/cerror.S | 3 ++- lib/libc/i386/sys/cerror.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S index 27fec0aecbb..7c21f5eb784 100644 --- a/lib/libc/amd64/sys/cerror.S +++ b/lib/libc/amd64/sys/cerror.S @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cerror.S,v 1.2 1994/02/21 05:19:09 rgrimes Exp $ + * $Id: cerror.S,v 1.1 1994/08/05 01:18:40 wollman Exp $ */ #if defined(SYSLIBC_SCCS) && !defined(lint) @@ -53,4 +53,5 @@ cerror: movl %eax,_errno #endif movl $-1,%eax + movl $-1,%edx ret diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S index 27fec0aecbb..7c21f5eb784 100644 --- a/lib/libc/i386/sys/cerror.S +++ b/lib/libc/i386/sys/cerror.S @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cerror.S,v 1.2 1994/02/21 05:19:09 rgrimes Exp $ + * $Id: cerror.S,v 1.1 1994/08/05 01:18:40 wollman Exp $ */ #if defined(SYSLIBC_SCCS) && !defined(lint) @@ -53,4 +53,5 @@ cerror: movl %eax,_errno #endif movl $-1,%eax + movl $-1,%edx ret