eecf3977 | 26-Jan-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
libroot_build: Implement FD writing STAT_ACCESS_TIME and STAT_MODIFICATION_TIME.
We have used and had fallback futimens() implementations in libroot_build (and in this file even) for over a decade,
libroot_build: Implement FD writing STAT_ACCESS_TIME and STAT_MODIFICATION_TIME.
We have used and had fallback futimens() implementations in libroot_build (and in this file even) for over a decade, but nobody seems to have noticed this bit of missing functionality which can be implemented with them.
In fact, this is rather important bit of functionality, as "copyattr" relies on it to preserve the mtimes of copied files; and we use recursive copyattr many places in Haiku builds. Thus, the lack of an implementation here was the cause of all files in built Haiku images having timestamps of whenever the build was done, and not whenever the file was actually modified.
This should make development on Haiku nightlies much more pleasant, as the system headers from the haiku_devel package should no longer have always-current timestamps with every upgrade.
show more ...
|
2532a287 | 23-Nov-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
Avoid using unions for LongDirEntry.
GCC still assumes that the dirent has no data past the end for some scenarios here and still mis-optimizes things. Therefore, drop the usages of unions altogethe
Avoid using unions for LongDirEntry.
GCC still assumes that the dirent has no data past the end for some scenarios here and still mis-optimizes things. Therefore, drop the usages of unions altogether, and instead use a casted character array.
Additionally, use B_FILE_NAME_LENGTH for the array, not B_PATH_NAME_LENGTH, and make sure to add 1 for the NULL terminator.
show more ...
|
8f03af00 | 18-Nov-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
Storage: Rework LongDirEntry to be a union.
Our dirent structure is "slim": it has a flexible-length array at the end which must be allocated to whatever size the consumer wants. However, we use [1]
Storage: Rework LongDirEntry to be a union.
Our dirent structure is "slim": it has a flexible-length array at the end which must be allocated to whatever size the consumer wants. However, we use [1] there and not [0] or [], which meant GCC thought it was not a flexible-length array, and so it optimized various string accesses that it assumed must be always false. Among these was BDirectory's check for "." and "..", and so that resulted in infinite loops.
When changing our dirent structure to a proper FLA instead of [1], GCC then throws errors on LongDirEntry as it has data "after" the FLA; which is what we want, but there is no way to tell GCC that. So now we use a union instead, which is the proper way to statically allocate a FLA.
This is part of #17389, but the real fix requires changing our dirent structure, which is coming in a separate commit.
show more ...
|