summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-04-21 10:45:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-24 03:19:15 (GMT)
commit1aeb7e756c82d31e46712ec7557c4cbae37dccd9 (patch)
treeab7e2a304b1a310d112bd168babd76b88714be2e /git-compat-util.h
parentefac8ac84b8802d654d517468dbe822273b316df (diff)
downloadgit-1aeb7e756c82d31e46712ec7557c4cbae37dccd9.zip
git-1aeb7e756c82d31e46712ec7557c4cbae37dccd9.tar.gz
git-1aeb7e756c82d31e46712ec7557c4cbae37dccd9.tar.bz2
parse_timestamp(): specify explicitly where we parse timestamps
Currently, Git's source code represents all timestamps as `unsigned long`. In preparation for using a more appropriate data type, let's introduce a symbol `parse_timestamp` (currently being defined to `strtoul`) where appropriate, so that we can later easily switch to, say, use `strtoull()` instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 8a4a3f8..fc1b5fe 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -319,6 +319,8 @@ extern char *gitdirname(char *);
#define PRIo32 "o"
#endif
+#define parse_timestamp strtoul
+
#ifndef PATH_SEP
#define PATH_SEP ':'
#endif