| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|\
| |
| | |
Allow more path components
|
| |
| |
| |
| |
| |
| |
| | |
- 60 instead of 30 path components
- 64 instead of 32 backslashes in a path (windows only)
Issue: 1161
|
|/
|
|
|
|
|
|
| |
Resolves #985
This is based on musl implementation,
http://git.musl-libc.org/cgit/musl/commit/?id=20cbd607759038dca57f84ef7e7b5d44a3088574
(thanks to jbergstroem@ for reference)
|
|
|
|
|
| |
"." is a legal path, if the string is empty after canonicalization
return ".".
|
| |
|
|
|
|
|
|
|
|
| |
For compatiblity reason, dwNumberOfProcessors in Win32 is capped at 32.
So even if your machine has more than 32 cores, Ninja spawns at most 34
subprocesses. This patch fixes the issue by using GetNativeSystemInfo,
which returns the system info from Wow64 point of view, instead of
GetSystemInfo.
|
|\
| |
| | |
Fixed cygwin compatibility (issue #806)
|
| |
| |
| |
| | |
Fixed platform specific issues causing cygwin build to fail.
|
|\ \
| | |
| | | |
whitespace/comment/wrap fixes, no intended functionality change
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
This makes this implementation more consisten with POSIX load avarage.
|
| |
|
|
|
|
|
|
|
| |
Added code to gracefully handle:
1. Call to CalculateProcessorLoad with not incremented ticks (fast calls
to GetSystemTimes can result same results),
2. Smooth/filter load estimation for consecutive calls.
|
|
|
|
|
| |
- Fixed bad logic condition,
- Added comment to clarify
|
|
|
|
|
| |
Inspired by:
http://stackoverflow.com/questions/23143693/retrieving-cpu-load-percent-total-in-windows-with-c
|
|
|
|
|
|
| |
Due to #690, file.c++ used to be escaped. + seems as safe as -, so allow
it to not be escaped, to keep compile command lines with a fairly common
extension slightly cleaner.
|
|
|
|
| |
Under ::CommandLineToArgvW() rules, the backslash character only gets special treatment if it’s immediately followed by a double quote. So, when checking to see if a string needs Win32 escaping, it’s sufficient to check for the presence of a double quote character. This allows paths like "foo\bar" to be recognised as “sensible” paths, which don’t require the full escaping.
|
|
|
|
|
|
| |
In summary: don’t escape if the path doesn’t contain problematic characters, otherwise:
- Shell: enclose string in single quotes, escape embedded single quotes with the magic quote-backslash-quote sequence
- Win32: Escape double quotes by doubling the number of consecutive backslashes that precede them (if any) and adding one more. Finally, double the number of trailing backslashes, and enclose the whole thing in double quotes.
|
|
|
|
|
|
|
|
|
| |
The current implementation is unnecessarily complex, because:
- The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN)
in terms of sysctl({CTL_HW,HW_NCPU}).
- get_nprocs() is a GNU extension, and glibc implements
sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().
|
|
|
|
| |
Should fix issue #584.
|
| |
|
| |
|
| |
|
|
|
|
| |
Hopefully fixes the build on Windows.
|
|
|
|
|
|
| |
This fixes:
src/util.cc: In function 'double GetLoadAverage()':
src/util.cc:337:28: error: 'getloadavg' was not declared in this scope
|
|
|
|
|
|
|
|
|
|
|
|
| |
ninja-build does not build on non-Linux archs, such as
GNU/kFreeBSD and GNU/Hurd.
The problem is that the GetProcessorCount() implementation for these
architectures is the sysconf() one, but <unistd.h> has not been
included, causing sysconf() and _SC_NPROCESSORS_ONLN to not be
declared. Another solution (which is the one I chose) is to make use
of the "linux" implementation which uses get_nprocs(), which is a GNU
extension and thus available for anything using GNU libc.
|
|
|
|
| |
Change-Id: Idb1ce67a320a9819de262d83b498ee10eb362ed2
|
| |
|
|\
| |
| | |
on windows a network path starts with two backslashes
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue #392 (didn't handle creating nested build dirs right).
Moves MakeDir out of util.h; all code should go through
DiskInterface to simplify testing. Moves ownership of the
DiskInterface into the client of the Builder, which also allows
removing some code that reached inside the object as well as
a minor leak.
|
|\
| |
| |
| |
| | |
Conflicts:
src/util.cc
|
| | |
|