From: Guillermo J. Rozas Date: Tue, 8 Jun 1993 04:05:18 +0000 (+0000) Subject: Preserve errno around dstack operations. X-Git-Tag: 20090517-FFI~8360 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ea77fea0e8db66db0b5c86f4fcafe9cdecde531c;p=mit-scheme.git Preserve errno around dstack operations. --- diff --git a/v7/src/microcode/intext.h b/v7/src/microcode/intext.h index 903f38be9..ade18026c 100644 --- a/v7/src/microcode/intext.h +++ b/v7/src/microcode/intext.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: intext.h,v 1.3 1993/02/10 23:31:23 adams Exp $ +$Id: intext.h,v 1.4 1993/06/08 04:05:18 gjr Exp $ -Copyright (c) 1990-91 Massachusetts Institute of Technology +Copyright (c) 1990-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -55,6 +55,7 @@ extern void EXFUN (exit_interruption_extent, (void)); #define INTERRUPTABLE_EXTENT(result, expression) \ { \ + int saved_errno; \ struct interruptable_extent * INTERRUPTABLE_EXTENT_frame = \ (enter_interruptable_extent ()); \ if ((setjmp (INTERRUPTABLE_EXTENT_frame -> control_point)) == 0) \ @@ -67,7 +68,9 @@ extern void EXFUN (exit_interruption_extent, (void)); errno = EINTR; \ (result) = (-1); \ } \ + saved_errno = errno; \ dstack_set_position (current_interruptable_extent -> position); \ + errno = saved_errno; \ } #endif /* SCM_INTEXT_H */