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

mac time.h functions #3152

Merged
merged 1 commit into from
Mar 29, 2023
Merged

mac time.h functions #3152

merged 1 commit into from
Mar 29, 2023

Conversation

shua
Copy link
Contributor

@shua shua commented Mar 17, 2023

I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).

@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2023

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

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@shua
Copy link
Contributor Author

shua commented Mar 17, 2023

It's currently failing because the new functions are unused, but I don't know how to fix this. I'm not sure why these functions are unused but the others are considered to be used. I tried git grep for some of the other functions defined in src/unix/bsd/apple/mod.rs but never found where they're being used, only where they're defined.

@JohnTitor
Copy link
Member

JohnTitor commented Mar 18, 2023

Because they're already defined and available on macOS via reexports:

pub fn localtime(time_p: *const time_t) -> *mut tm;

Have you tried importing them actually? I'd recommend checking if an item is available at first so that you could confirm what's missing :)

@shua
Copy link
Contributor Author

shua commented Mar 18, 2023

ah, thanks, I misunderstood the errors. I updated the PR to remove the time.h functions and struct that were already defined in src/unix/mod.rs and src/unix/linux_like/mod.rs..

@shua
Copy link
Contributor Author

shua commented Mar 18, 2023

@rustbot review

@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2023

Error: The feature shortcut is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@shua
Copy link
Contributor Author

shua commented Mar 22, 2023

@JohnTitor are you the right person to ask for a review on this?

@JohnTitor
Copy link
Member

Yeah, could you squash commits into one?

@shua
Copy link
Contributor Author

shua commented Mar 27, 2023

The test failure seems unrelated to my changes. The test that failed was targeting freebsd 14, but my changes only touched two files, both specific to macos. I can try recommitting the same changes to retest.

@JohnTitor
Copy link
Member

It's fixed on master :)
@bors r+

@bors
Copy link
Contributor

bors commented Mar 28, 2023

📌 Commit 78244fe has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Mar 28, 2023

⌛ Testing commit 78244fe with merge b6c2e00...

bors added a commit that referenced this pull request Mar 28, 2023
mac time.h functions

I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
@bors
Copy link
Contributor

bors commented Mar 28, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

@bors retry timeout

@bors
Copy link
Contributor

bors commented Mar 28, 2023

⌛ Testing commit 78244fe with merge 6b7643d...

bors added a commit that referenced this pull request Mar 28, 2023
mac time.h functions

I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
@bors
Copy link
Contributor

bors commented Mar 28, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Mar 28, 2023

⌛ Testing commit 78244fe with merge 4c0ff2c...

bors added a commit that referenced this pull request Mar 28, 2023
mac time.h functions

I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
@bors
Copy link
Contributor

bors commented Mar 28, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

cursed 😱
@bors retry

@bors
Copy link
Contributor

bors commented Mar 28, 2023

⌛ Testing commit 78244fe with merge 177857b...

bors added a commit that referenced this pull request Mar 28, 2023
mac time.h functions

I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
@bors
Copy link
Contributor

bors commented Mar 28, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Mar 29, 2023

⌛ Testing commit 78244fe with merge 21d90af...

@bors
Copy link
Contributor

bors commented Mar 29, 2023

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

1 similar comment
@bors
Copy link
Contributor

bors commented Mar 29, 2023

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

@bors
Copy link
Contributor

bors commented Mar 29, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@bors bors merged commit 21d90af into rust-lang:master Mar 29, 2023
9 of 10 checks passed
@shua shua deleted the mactime branch March 29, 2023 16:23
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

4 participants