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

Add confstr and guaranteed _CS_* constants on apple #2883

Merged
merged 1 commit into from Aug 23, 2022

Conversation

thomcc
Copy link
Member

@thomcc thomcc commented Aug 19, 2022

I actually just want _CS_DARWIN_USER_TEMP_DIR, and the confstr function, but I also have added the other "guaranteed" _CS_* values (e.g. present in the output of man confstr).

This is apparently a POSIX API but I have no idea which other platforms support it, nor what values should be provided. It's somewhat important on Darwin (the only way to access the user temp dir), but I'm not sure what other use it has, so I've only provided it on Darwin.

There are a few other constants in Darwin unistd.h, but they're omitted since they're only conditionally present, and they provide values that... don't actually work1. As a result, I've only provided the ones documented by confstr documentation.

Footnotes

  1. For example, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS nominally provides values that can be passed to a c compiler, but it gives -W 64 for me, which does not seem to work with clang.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Aug 23, 2022

📌 Commit 52199a6 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 23, 2022

⌛ Testing commit 52199a6 with merge f6eb496...

@bors
Copy link
Contributor

bors commented Aug 23, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing f6eb496 to master...

@bors bors merged commit f6eb496 into rust-lang:master Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants