Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

It looks like Cygwin doesn't actually support signal-based I/O,
so while this compiles, it won't be correct and will need
addressing in another way.

It looks like Cygwin doesn't actually support signal-based I/O,
so while this compiles, it won't be correct and will need
addressing in another way.
@waywardmonkeys
Copy link
Contributor Author

@masinter This should fix Cygwin compilation for you.

waywardmonkeys referenced this pull request Dec 31, 2020
This changes from `FASYNC` to `O_ASYNC`, `FNDELAY` to `O_NONBLOCK`,
and `O_NDELAY` to `O_NONBLOCK`. These are the modern names.

`O_NONBLOCK` is part of the POSIX standard. However, `O_ASYNC` is
specific to Linux and BSD. It is not available on Solaris, where
we still need to use `FASYNC`. Also, the behavior of having I/O
trigger a `SIGIO` signal is not in POSIX, since the `SIGIO` signal
is not in POSIX. Instead, it is only the behavior of having `SIGURG`
being signalled for out of band data that is specified.

We also takes this opportunity to collapse some multi-line calls
to get the flags, store it into a temp, and then set them, to
just doing it in one line, skipping the stored temporary value.

We also change one instance of `65535 - FNDELAY` to `~O_NONBLOCK`.

Closes Interlisp/medley#85.
Copy link
Collaborator

@nbriggs nbriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nbriggs nbriggs merged commit 0bbdf60 into Interlisp:master Dec 31, 2020
@nbriggs
Copy link
Collaborator

nbriggs commented Dec 31, 2020

@masinter The master branch should be ready for you to recompile on Cygwin now.

@waywardmonkeys waywardmonkeys deleted the fix-O_ASYNC-compilation-cygwin branch December 31, 2020 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants