mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 03:50:29 +00:00
Improve build system
- Reduce full build latency from ~20s to ~18s - Bring back silent mode if `make V=0` is passed - Demodernize utimes() polyfill so it works RHEL5 - Delete some old shell scripts that are no longer needed - Truncate long lines when outputting builds to Emacs buffers
This commit is contained in:
parent
c797f139bb
commit
b740cca642
39 changed files with 440 additions and 916 deletions
|
@ -26,16 +26,17 @@
|
|||
*
|
||||
* @param times if NULL means now
|
||||
* @return 0 on success or -1 w/ errno
|
||||
* @asyncsignalsafe
|
||||
*/
|
||||
int utime(const char *path, const struct utimbuf *times) {
|
||||
struct timespec ts[2];
|
||||
struct timeval tv[2];
|
||||
if (times) {
|
||||
ts[0].tv_sec = times->actime;
|
||||
ts[0].tv_nsec = 0;
|
||||
ts[1].tv_sec = times->modtime;
|
||||
ts[1].tv_nsec = 0;
|
||||
return utimensat(AT_FDCWD, path, ts, 0);
|
||||
tv[0].tv_sec = times->actime;
|
||||
tv[0].tv_usec = 0;
|
||||
tv[1].tv_sec = times->modtime;
|
||||
tv[1].tv_usec = 0;
|
||||
return utimes(path, tv);
|
||||
} else {
|
||||
return utimensat(AT_FDCWD, path, NULL, 0);
|
||||
return utimes(path, NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue