-
Notifications
You must be signed in to change notification settings - Fork 63
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
Implement proper handling of dirent in FormulationManager, fixes #517 #518
Implement proper handling of dirent in FormulationManager, fixes #517 #518
Conversation
} | ||
else if ( entry->d_type == DT_UNKNOWN ) | ||
#endif | ||
{ |
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.
This is throwing me off - if the _DIRENT_HAVE_D_TYPE condition doesn't pass, does this yield:
if( match ) {
{
struct stat st;
if( stat((path+entry->d_name)>c_str(), &st) != 0) {...
}
}
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.
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.
Where is _DIRENT_HAVE_D_TYPE defined and is it a gcc extension? Ie will this work with intel compilers
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 it looks like type information can also be present with the preprocessor directives of _DEFAULT_SOURCE glibc > 2.19 or _BSD_SOURCE for earlier library versions. Even in this case the d_type could be set to unknown based on the file system being read.
This is in |
I think the fallback to |
Fixes a bug that prevents forcing files from being properly discovered/validated on certain systems/file-systems.
Changes
stat
when appropriate.Testing
Todos
dirent
andreaddir
for similar issues.Checklist
Target Environment support