| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
disk_interface: Improve the stat cache handling for case sensitive folders on Windows
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
on Windows
The path used as argument to FindFirstFileExA is no longer being converted to lowercase.
By not converting the path to lower case, case sensitive folders will now be handled correctly.
Case insensitive folders still works as expected because casing doesn't matter on those.
All entries in the stat cache remains lowercase to avoid potential cache misses.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
remove() deletes both files and directories. On Windows we have to
select the correct function (DeleteFile will yield Permission Denied
when used on a directory)
This fixes the behavior of ninja -t clean in some cases
https://github.com/ninja-build/ninja/issues/828
|
| |
| |
| |
| |
| |
| |
| |
| | |
Revise the logic from commit 2d7f7e55 (Delete read-only files on
Windows, too, 2020-12-07) to check if `GetFileAttributes` or
`DeleteFile` failed due either variant of the file/path-not-found error.
Issue: #1886
|
| | |
|
| | |
|
|/
|
|
| |
Fixes main complaint of #1886.
|
|
|
|
| |
header files
|
|
|
|
| |
stat() needs unistd.h in addition to sys/stat.h and sys/types.h per POSIX.
At least one (hobby) OS does need unistd.h, so add an include for it.
|
|
|
|
|
| |
In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
compatibility macro. Should help avoid hardcoding platform detection.
|
|\
| |
| | |
DirName's separators and their length are known at compile time
|
| | |
|
|\ \
| | |
| | | |
Port to AIX platform
|
| | |
| | |
| | |
| | | |
Taking care of printf format specifiers and large files using compiler macros in configure.py
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
./src/disk_interface.cc: In member function 'virtual TimeStamp RealDiskInterface::Stat(const string&, std::__cxx11::string*) const':
./src/disk_interface.cc:216:51: error: 'struct stat' has no member named 'st_mtimensec'; did you mean 'st_mtim'?
return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
^~~~~~~~~~~~
st_mtim
|
| |
| |
| |
| |
| | |
This reverts commit 6c864097ef11da366fb4070e6ab9f34d6a293766
and fixes the broken Appveyor builds on GitHub.
|
|\ \
| | |
| | | |
Fix building on Windows in UNICODE mode
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix disk_interface_test.cc on Windows for 64-bit timestamp
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Make sure that stat on Windows, both with and without cache, returns
"missing file" when running stat on notadir/foo where notadir is a
file.
|
| |/ /
| | |
| | |
| | |
| | | |
subdir/subsubdir/.. seems to get the time of subdir/subsubdir on NTFS
(Windows 7), not the time of subdir.
|
|/ /
| |
| |
| | |
Solaris also does not define struct stat's st_mtimensec field.
|
| |
| |
| |
| |
| | |
Add parentheses so that constant does not overflow; include inttypes.h
when using MinGW to get the proper macros.
|
| |
| |
| |
| |
| | |
This uses the macros as defined by the man page, which, as noted in the
comments, are defined correctly on as many libc's that I could check.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This uses nanoseconds on POSIX (±~292 years) and 100-ns increments on
Windows (±~29247 years).
The fallbacks to different structure fields is the only thing grabbed
from #337, with a slight modification in implementation.
|
| | |
|
|/
|
|
|
|
|
| |
Stat is not always used through Node::Stat, it is often used directly
through DiskInterface. THe next patches will cause it to be called
even more often through DiskInterface, so move the metrics to
DiskInterface.
|
|
|
|
|
|
|
|
| |
The recommended replacement VerifyVersionInfo should work with the same
SDKs that GetVersionEx worked with (while the wrappers in
VersionHelpers.h require a recent SDK). This patch should not change
behavior, and it's not supposed to increase build requirements. If
this makes things harder to build, please let me know.
|
|
|
|
|
|
| |
Return a status so callers can distinguish a missing file from an empty
file. This allows our VirtualFileSystem test infrastructure to report
as missing any file for which it has no entry.
|
|
|
|
|
|
|
|
|
| |
Also check for Stat() failure in a few more places.
This way, ninja doesn't print two "ninja: error: " lines if stat() fails
during a build. It also makes it easier to keep the stat tests quiet.
Every caller of Stat() needs to explicitly log the error string if
that's desired.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Doesn't slow down empty build times measurably, and
saves some memory on non-empty builds.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
don't Fail if trying to mkdir when the dir already exists
|
| | |
|