-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix build failure in Alpha architecture #2986
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -167,7 +167,7 @@ int UTIL_utime(const char* filename, const stat_t *statbuf) | |||||
* that struct stat has a struct timespec st_mtim member. We need this | ||||||
* check because there are some platforms that claim to be POSIX 2008 | ||||||
* compliant but which do not have st_mtim... */ | ||||||
#if (PLATFORM_POSIX_VERSION >= 200809L) && defined(st_mtime) | ||||||
#if (PLATFORM_POSIX_VERSION >= 200809L) && defined(st_mtime) || defined(__alpha__) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Can you add parenthesis to clarify the statement?
Suggested change
|
||||||
/* (atime, mtime) */ | ||||||
struct timespec timebuf[2] = { {0, UTIME_NOW} }; | ||||||
timebuf[1] = statbuf->st_mtim; | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I guess it means
__alpha__
platform never claims POSIX 2008 compliance, since it probably is not,yet nonetheless support
struct timespec
andst_mtime
as extended features ?The surprising part here is that, in this construction,
__alpha__
is presumed enough of a hint to guarantee the support ofstruct timespec
, no matter the software level. I would have expected__alpha__
to be much older thanstruct timespec
, and therefore logically, older variants of software for__alpha__
would not providestruct timespec
. Though I don't know enough about__alpha__
history to be sure about that.Another avenue could have been to declare
PLATFORM_POSIX_VERSION = 200809L
when the right set of conditions is present (__alpha__
and maybe another condition), but this would imply support of other stuff beyondstruct timespec
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Cyan4973, as the linked bug states, Alpha does not define
st_mtime
(which makes it non-compliant with POSIX...). So that won't work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay,
so
st_mtime
is in fact not required,it's just employed as a way to improve odds that
struct timespec.st_mtim
is actually supported ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. We previously found some platform (I forget which) which claims to be POSIX 2008 but doesn't have
struct timespec
and we detect that by observing that they don't definest_mtime
.