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

Implemented File birthtime #3414

Merged
merged 9 commits into from May 28, 2015
Merged

Implemented File birthtime #3414

merged 9 commits into from May 28, 2015

Conversation

tak1n
Copy link
Member

@tak1n tak1n commented May 28, 2015

Opening this pr because I'm not sure if I did it the "right" way.

The configure script checks if on your system in stat.h the function birthtime() is defined.
If it is a HAVE_ST_BIRTHTIME macro is set which can be used in c++ to check whether to return st_.st_birthtime as Time Object or return a Primitives::failure().

In the ruby Stat#birthtime method a NotImplementedError is raised if the primitive fails.
Also updated the specs for the specific platforms, the problem here I'm not sure which platform supports birthtime() and which don't.

Belongs to #3264

@chuckremes
Copy link
Member

I think this is probably okay to merge. I don't know when I'll finish the ffi-io branch and merge it to master (assuming it's acceptable). In the meantime, this solves this particular gap.

@@ -1230,6 +1230,10 @@ int main() { return tgetnum(""); }
@defines << "HAVE_GETTID"
end

if has_function("birthtime", ["sys/stat.h"])
@defines << "HAVE_ST_BIRTHTIME"
end
Copy link
Member

Choose a reason for hiding this comment

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

Sorry to be picky here, but line 1234 has an extra leading whitespace.

brixen added a commit that referenced this pull request May 28, 2015
@brixen brixen merged commit af66706 into 2.2 May 28, 2015
@yorickpeterse yorickpeterse deleted the file-birthtime branch October 3, 2015 23:13
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.

None yet

4 participants