Re: [PATCH 2/2] better introduction of GIT with USE_NSEC defined
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Mar 6, 2009, 07:56 UTC
- Message-ID
- <49B0D739.3050105@viscovery.net>
- In-Reply-To
- <7vd4cvzqkl.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 17 quoted lines
> Record ns-timestamps if possible, but do not use it without USE_NSEC > > Traditionally, the lack of USE_NSEC meant "do not record nor use the > nanosecond resolution part of the file timestamps". To avoid problems on > filesystems that lose the ns part when the metadata is flushed to the disk > and then later read back in, disabling USE_NSEC has been a good idea in > general. > > If you are on a filesystem without such an issue, it does not hurt to read > and store them in the cached stat data in the index entries even if your > git is compiled without USE_NSEC. The index left with such a version of > git can be read by git compiled with USE_NSEC and it can make use of the > nanosecond part to optimize the check to see if the path on the filesystem > hsa been modified since we last looked at. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > ---
...
> +# Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec" > +# available. This automatically turns USE_NSEC off. > +#
...
Show 8 quoted lines
> @@ -802,6 +805,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) > RUNTIME_PREFIX = YesPlease > NO_POSIX_ONLY_PROGRAMS = YesPlease > NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease > + NO_NSEC = YesPlease > COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch > COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1 > COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
Thanks, with this the build no longer breaks on Windows. But I need this option on AIX as well:
diff --git a/Makefile b/Makefile index 137a3ff..b974978 100644 --- a/Makefile +++ b/Makefile @@ -737,6 +737,7 @@ ifeq ($(uname_S),AIX) NO_MEMMEM = YesPlease NO_MKDTEMP = YesPlease NO_STRLCPY = YesPlease + NO_NSEC = YesPlease FREAD_READS_DIRECTORIES = UnfortunatelyYes INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPlease -- Hannes