-
Notifications
You must be signed in to change notification settings - Fork 129
OpenBSD support #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenBSD support #228
Conversation
On this platform, the TIOCGWINSZ ioctl identifier is a complex macro. Since we don't have a C bridging header obviously available to get the flattened value, supply is the flattened value obtained elsewhere. This is of course brittle but this is the simplest way around this for now. Compare swiftlang#291 in swift-argument-parser.
@swift-ci please test |
cc @drexin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool stuff, added a couple of questions / suggestions
32e0447
to
144f162
Compare
144f162
to
39df599
Compare
@swift-ci please test |
lgtm, pending @drexin input |
@3405691582 we would need a corresponding PR into SwiftPM itself given that this introduces a new enum case that is not handled there in some cases. cc @neonichu |
39df599
to
6322f37
Compare
@swift-ci test |
@tomerd created SPM pull 3572 for platform support, which should cover the additional cases. |
swiftlang/swift-package-manager#3572 |
@3405691582 looks like there is some syntax issue? |
6322f37
to
50166ac
Compare
Oops! Sorry about that. Fixed. |
swiftlang/swift-package-manager#3572 |
@neonichu do you know why the cross-PR test is not working, or are those real issues with the changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, only one nit about Android change.
@buttaface So as not to contradict other review guidance about this, would you mind if I made that change for Android in another pr? |
It's okay, you can make it here. Dario was likely just trying to not break things for me, and I'm telling you I tested building it, so please go ahead here. It's just three lines to remove, no big deal. |
Of note is the changes to FSWatch. inotify is only available on Linux, so do not condition on `canImport(Glibc)` but restrict to operating systems using the Linux kernel only. Naturally, OpenBSD does not have FSEventStream either, so for now, create a no-op delegate for this platform. It is possible that this particular functionality might be provided by some creative use of kevent, but we defer that here: such behavior would be important for platforms that do not have support for monitoring filesystem events. On this platform, SQLite resides in /usr/local/lib, so make the necessary cmake changes as well, while we are here. We do still need to do something about the `unversionedTriple` inference: this will be handled separately.
50166ac
to
c87d728
Compare
SGTM. Done. |
swiftlang/swift-package-manager#3572 |
swiftlang/swift-package-manager#3572 |
TSCUtility: repair the windows build after #228
Preliminary OpenBSD support. Some particular notes:
Of note is the changes to FSWatch. inotify is only available on Linux,
so do not condition on
canImport(Glibc)
but restrict to operatingsystems using the Linux kernel only.
Naturally, OpenBSD does not have FSEventStream either, so for now,
create a no-op delegate for this platform. It is possible that this
particular functionality might be provided by some creative use of
kevent, but we defer that here: such behavior would be important for
platforms that do not have support for monitoring filesystem events.
On this platform, SQLite resides in /usr/local/lib, so make the
necessary cmake changes as well, while we are here.
We do still need to do something about the
unversionedTriple
inference: this will be handled separately.
Flatten TIOCGWINSZ on OpenBSD.
On this platform, the TIOCGWINSZ ioctl identifier is a complex macro.
Compare TSCUtility: deprecate dl* #291 in swift-argument-parser.