On 12/11/21 03:35, Jan Nieuwenhuizen wrote:
It looks like the inode returned by
stat is always 0 on MinGW (at least it is under wine), so also when
choosing this approach we would need to special case our client code for
MinGW?

Yes, you'll have problems on such platforms. For ideas about this, please see the last several lines of:

https://www.gnu.org/software/gnulib/manual/html_node/sys_002fstat_002eh.html

(in particular the "partial workaround").

Since you're doing all this merely as an optimization, you can avoid doing the optimization on nonstandard platforms where stat is unreliable; that way, your code should still work even on nonstandard platforms, while having the optimized performance on standard platforms.

Reply via email to