Skip to content
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

[solarish/freebsd] add a few missing constants and functions #3936

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Sep 20, 2024

Add:

  • O_RSYNC on Solaris and illumos, based on the source code at 1. This was
    added a long time ago, and the blame indicates that the constant is shared
    with Solaris.
  • POLLRDHUP on illumos, based on the source code at 2. This was also added
    a long time ago, but is not in the man page (I'll track that down separately,
    but it has been supported and used for many years). I cannot verify whether
    this is in Solaris.
  • POLLRDHUP on FreeBSD, based on this man page 3. This was added in 2021 4.
  • posix_fadvise on illumos, based on this man page 5. The related constants
    are on GitHub 6. posix_fadvise seems to exist on Solaris 7 but I
    haven't been able to verify any of the constants so I've left it out of this
    PR.
  • posix_fallocate on illumos (man page 8) and Solaris (man page 9).

@rustbot
Copy link
Collaborator

rustbot commented Sep 20, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Sep 20, 2024

Some changes occurred in solarish module

cc @jclulow, @pfmooney

@sunshowers
Copy link
Contributor Author

Expanded this a bit since I ran into other missing constants :)

@sunshowers sunshowers changed the title [solarish] add O_RSYNC [solarish/freebsd] add a few missing constants Sep 20, 2024
@sunshowers sunshowers force-pushed the illumos-rsync branch 2 times, most recently from 1cb0108 to 2e3e305 Compare September 20, 2024 06:50
@sunshowers sunshowers changed the title [solarish/freebsd] add a few missing constants [solarish/freebsd] add a few missing constants and a function Sep 20, 2024
Add:

* `O_RSYNC` on Solaris and illumos, based on the source code at [1]. This was
  added a long time ago, and the blame indicates that the constant is shared
  with Solaris.
* `POLLRDHUP` on illumos, based on the source code at [2]. This was also added
  a long time ago, but is not in the man page (I'll track that down separately,
  but it has been supported and used for many years). I cannot verify whether
  this is in Solaris.
* `POLLRDHUP` on FreeBSD, based on this man page [3]. This was added in 2021 [4].
* `posix_fadvise` on illumos, based on this man page [5]. The related constants
  are on GitHub [6]. `posix_fadvise` seems to exist on Solaris [7] but I
  haven't been able to verify any of the constants so I've left it out of this
  PR.
* `posix_fallocate` on illumos (man page [8]) and Solaris (man page [9]).

[1]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L70
[2]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/poll.h#L66
[3]: https://man.freebsd.org/cgi/man.cgi?poll
[4]: https://cgit.freebsd.org/src/commit/sys/sys/poll.h?id=3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e
[5]: https://illumos.org/man/3C/posix_fadvise
[6]: https://github.com/illumos/illumos-gate/blob/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L407-L412
[7]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fadvise-3c.html
[8]: https://illumos.org/man/3C/posix_fallocate
[9]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fallocate-3c.html
@sunshowers sunshowers changed the title [solarish/freebsd] add a few missing constants and a function [solarish/freebsd] add a few missing constants and functions Sep 20, 2024
@sunshowers
Copy link
Contributor Author

@rustbot label stable-nominated

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 26, 2024
@pfmooney
Copy link
Contributor

The illumos side of the change looks fine to me.

@sunshowers
Copy link
Contributor Author

Is there anything I can do to help get this landed? Happy to provide more references, etc.

@tgross35
Copy link
Contributor

tgross35 commented Oct 15, 2024

Is there anything I can do to help get this landed? Happy to provide more references, etc.

No this looks great, thanks for providing great sources - makes things much easier. This repo just has a bit of a slow turnaround time.

@tgross35 tgross35 added this pull request to the merge queue Oct 15, 2024
Merged via the queue into rust-lang:main with commit 94a0ccd Oct 15, 2024
41 checks passed
@sunshowers sunshowers deleted the illumos-rsync branch October 16, 2024 17:43
sunshowers added a commit to sunshowers/libc that referenced this pull request Oct 16, 2024
Add:

* `O_RSYNC` on Solaris and illumos, based on the source code at [1]. This was
  added a long time ago, and the blame indicates that the constant is shared
  with Solaris.
* `POLLRDHUP` on illumos, based on the source code at [2]. This was also added
  a long time ago, but is not in the man page (I'll track that down separately,
  but it has been supported and used for many years). I cannot verify whether
  this is in Solaris.
* `POLLRDHUP` on FreeBSD, based on this man page [3]. This was added in 2021 [4].
* `posix_fadvise` on illumos, based on this man page [5]. The related constants
  are on GitHub [6]. `posix_fadvise` seems to exist on Solaris [7] but I
  haven't been able to verify any of the constants so I've left it out of this
  PR.
* `posix_fallocate` on illumos (man page [8]) and Solaris (man page [9]).

[1]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L70
[2]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/poll.h#L66
[3]: https://man.freebsd.org/cgi/man.cgi?poll
[4]: https://cgit.freebsd.org/src/commit/sys/sys/poll.h?id=3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e
[5]: https://illumos.org/man/3C/posix_fadvise
[6]: https://github.com/illumos/illumos-gate/blob/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L407-L412
[7]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fadvise-3c.html
[8]: https://illumos.org/man/3C/posix_fallocate
[9]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fallocate-3c.html

(backport <rust-lang#3936>)
(cherry picked from commit 52e81a8)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Oct 16, 2024
Add:

* `O_RSYNC` on Solaris and illumos, based on the source code at [1]. This was
  added a long time ago, and the blame indicates that the constant is shared
  with Solaris.
* `POLLRDHUP` on illumos, based on the source code at [2]. This was also added
  a long time ago, but is not in the man page (I'll track that down separately,
  but it has been supported and used for many years). I cannot verify whether
  this is in Solaris.
* `POLLRDHUP` on FreeBSD, based on this man page [3]. This was added in 2021 [4].
* `posix_fadvise` on illumos, based on this man page [5]. The related constants
  are on GitHub [6]. `posix_fadvise` seems to exist on Solaris [7] but I
  haven't been able to verify any of the constants so I've left it out of this
  PR.
* `posix_fallocate` on illumos (man page [8]) and Solaris (man page [9]).

[1]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L70
[2]: https://github.com/illumos/illumos-gate/blame/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/poll.h#L66
[3]: https://man.freebsd.org/cgi/man.cgi?poll
[4]: https://cgit.freebsd.org/src/commit/sys/sys/poll.h?id=3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e
[5]: https://illumos.org/man/3C/posix_fadvise
[6]: https://github.com/illumos/illumos-gate/blob/f389e29fb4a3b48598f4e25151eb570247c6deed/usr/src/uts/common/sys/fcntl.h#L407-L412
[7]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fadvise-3c.html
[8]: https://illumos.org/man/3C/posix_fallocate
[9]: https://docs.oracle.com/cd/E88353_01/html/E37843/posix-fallocate-3c.html

(backport <rust-lang#3936>)
(cherry picked from commit 52e81a8)
@tgross35 tgross35 mentioned this pull request Oct 16, 2024
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants