mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-22 07:09:18 +02:00
revert last patch. forgot to set errno before checking for it.
This commit is contained in:
parent
52781e59e0
commit
b56cfbb083
1 changed files with 1 additions and 4 deletions
5
sexp.c
5
sexp.c
|
@ -1984,13 +1984,10 @@ int sexp_maybe_block_port (sexp ctx, sexp in, int forcep) {
|
|||
if (sexp_port_flags(in) == SEXP_PORT_UNKNOWN_FLAGS)
|
||||
sexp_port_flags(in) = fcntl(sexp_port_fileno(in), F_GETFL);
|
||||
if (sexp_port_flags(in) & O_NONBLOCK) {
|
||||
errno = 0;
|
||||
if (!forcep
|
||||
&& (((c = sexp_read_char(ctx, in)) == EOF)
|
||||
#if SEXP_USE_STRING_STREAMS
|
||||
&& (ferror(sexp_port_stream(in)) == EAGAIN)
|
||||
#else
|
||||
&& (errno == EAGAIN)
|
||||
#endif
|
||||
&& sexp_opcodep((f=sexp_global(ctx, SEXP_G_THREADS_BLOCKER))))) {
|
||||
((sexp_proc2)sexp_opcode_func(f))(ctx sexp_api_pass(f, 1), in);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue