wolfcw / libfaketime

libfaketime modifies the system time for a single application
https://github.com/wolfcw/libfaketime
GNU General Public License v2.0
2.64k stars 321 forks source link

fixes #374 fix compiling without FAKE_STAT or with FAKE_UTIME #375

Closed inorton closed 2 years ago

inorton commented 2 years ago

This fixing compiling with EXTRA_FLAGS=-UFAKE_STAT

This also seems to fix a problem where as by default FAKE_UTIME is disabled at compile time, the fake_utime_disabled gets set to 0 (enabling it?)

v-gb commented 1 year ago

This change confused me: it breaks the build with -DFAKE_FILE_TIMESTAMPS -UFAKE_UTIME, and it significantly changed the meaning of FAKE_UTIME: src/Makefile says that -DFAKE_FILE_SYSTEM make utimes faking opt-in while -DFAKE_UTIME makes utimes faking opt-out. I think that doc was backwards, but now the behavior is something else (-DFAKE_UTIME controls whether FAKE_UTIME can be decided at runtime or something).

It'd be good to line up the doc and the code, whether by changing the doc, the code or both. I could perhaps make a change, but I don't know which way we want to go.