All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Kjetil Barvik <barvik@broadpark.no>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] better introduction of GIT with USE_NSEC defined
Date: Thu, 05 Mar 2009 12:55:25 +0100	[thread overview]
Message-ID: <49AFBDAD.5040501@viscovery.net> (raw)
In-Reply-To: <49AF9745.8050207@viscovery.net>

Johannes Sixt schrieb:
> Kjetil Barvik schrieb:
>> -	istate->timestamp.sec = st.st_mtime;
>> -#ifdef USE_NSEC
>> +	istate->timestamp.sec = (unsigned int)st.st_mtime;
>>  	istate->timestamp.nsec = (unsigned int)st.st_mtim.tv_nsec;
>> -#else
>> -	istate->timestamp.nsec = 0;
>> -#endif
> 
> Doesn't this break on systems where st_mtime is time_t and st_mtim does
> not exist?

Yes, it breaks. You can test this on Linux by commenting out these two
lines in git-compat-util.h:

diff --git a/git-compat-util.h b/git-compat-util.h
index dcf4127..ab4b615 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -44,8 +44,8 @@
 #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #endif
 #define _ALL_SOURCE 1
-#define _GNU_SOURCE 1
-#define _BSD_SOURCE 1
+/*#define _GNU_SOURCE 1*/
+/*#define _BSD_SOURCE 1*/

 #include <unistd.h>
 #include <stdio.h>

The result even passes the test suite (as long as I don't merge
kb/checkout-optim, of course).

-- Hannes

  reply	other threads:[~2009-03-05 11:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 17:47 [PATCH 0/2] some few more 'git checkout' improvements Kjetil Barvik
2009-03-04 17:47 ` [PATCH 1/2] stat_tracking_info(): only count real commits Kjetil Barvik
2009-03-04 17:47 ` [PATCH 2/2] better introduction of GIT with USE_NSEC defined Kjetil Barvik
2009-03-05  0:41   ` Junio C Hamano
2009-03-05  7:17     ` Kjetil Barvik
2009-03-05  7:38       ` Junio C Hamano
2009-03-05  9:11   ` Johannes Sixt
2009-03-05 11:55     ` Johannes Sixt [this message]
2009-03-05 18:55       ` Junio C Hamano
2009-03-05 20:02         ` Junio C Hamano
2009-03-06  7:56           ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49AFBDAD.5040501@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=barvik@broadpark.no \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.