Platform-portable mtime_ns (mirrors pipeline_incremental.c). */
| 498 | |
| 499 | /* Platform-portable mtime_ns (mirrors pipeline_incremental.c). */ |
| 500 | static int64_t sig_stat_mtime_ns(const struct stat *st) { |
| 501 | #ifdef __APPLE__ |
| 502 | return ((int64_t)st->st_mtimespec.tv_sec * NS_PER_SEC) + (int64_t)st->st_mtimespec.tv_nsec; |
| 503 | #elif defined(_WIN32) |
| 504 | return (int64_t)st->st_mtime * NS_PER_SEC; |
| 505 | #else |
| 506 | return ((int64_t)st->st_mtim.tv_sec * NS_PER_SEC) + (int64_t)st->st_mtim.tv_nsec; |
| 507 | #endif |
| 508 | } |
| 509 | |
| 510 | /* Fold a listed path's (size, mtime) into the signature so an in-place edit |
| 511 | * of an already-dirty file still produces a new signature. A failed stat |
no outgoing calls
no test coverage detected