Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: Fix stat() test to mask out unwanted bits #3798

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

Merged
merged 1 commit into from
May 26, 2016

Conversation

mmuman
Copy link
Contributor

@mmuman mmuman commented May 24, 2016

Haiku and Hurd both pass extra bits in struct stat::st_mode.

@mmuman mmuman mentioned this pull request May 24, 2016
@mmuman
Copy link
Contributor Author

mmuman commented May 24, 2016

Of course win32 doesn't know about the most basic POSIX constants:

'S_IUMSK' : undeclared identifier

Should I patch src/posix.h ?

@ethomson
Copy link
Member

Neither does Linux or Mac, though. I don't think that's a POSIX thing, I think it's something Haiku invented.

@mmuman
Copy link
Contributor Author

mmuman commented May 24, 2016

Oh, indeed, I didn't check other stat headers... Linux' sys/stat.h has an ALLPERMS but ifdeffed, so I'm not sure it's always available. And mingw headers don't seem to have it. I'll just hardcode it but it's ugly.

Haiku and Hurd both pass extra bits in struct stat::st_mode.
@mmuman
Copy link
Contributor Author

mmuman commented May 24, 2016

Let's see this way...

@mmuman
Copy link
Contributor Author

mmuman commented May 24, 2016

Looks like tests passed :)

@ethomson
Copy link
Member

Looks good to me, thanks!

@ethomson ethomson merged commit e102daa into libgit2:master May 26, 2016
@mmuman mmuman deleted the stat-test-fix branch May 26, 2016 15:36
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.

2 participants