Re: [PATCH] Create USE_ST_TIMESPEC and turn it on for Darwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 8, 2009, at 4:51 PM, Junio C Hamano wrote:

I think this patch moves things in the right direction, but there are
other uses of "st_[cm]tim.tv_nsec" that do not use the ST_[CM]TIME_NSEC
macro.

$ git grep -n -e 'st_[cm]tim\.' --cached -- '*.[ch]'
builtin-fetch-pack.c:810:				|| st.st_mtim.tv_nsec != mtime.nsec
git-compat-util.h:396:#define ST_CTIME_NSEC(st) ((unsigned int) ((st).st_ctim.tv_nsec)) git-compat-util.h:397:#define ST_MTIME_NSEC(st) ((unsigned int) ((st).st_mtim.tv_nsec)) read-cache.c:207: if (ce->ce_mtime.nsec != (unsigned int)st- >st_mtim.tv_nsec) read-cache.c:209: if (trust_ctime && ce->ce_ctime.nsec != (unsigned int)st->st_ctim.tv_nsec)

Interesting. I couldn't use git-grep due to other problems, but thought any other tim/timespec issues would have stopped my compilation. Looking at the code, this is because everything other than the #defines in git-compat-util.h are surrounded by USE_NSEC which is not defined on my machine.

However, I noticed another breakage entirely. Namely, that USE_NSEC is not defined anywhere. There's a comment in the Makefile that says "define USE_NSEC below", but there is no code that checks for USE_NSEC and sets the appropriate compiler switch. Trivial patch to follow.

Probably we should apply the following patch as a fix, and then apply your
enhancement to support st_[cm]timespec systems?

Your patch looks sane to me.

~~ Brian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux