summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJoachim Schmitz <jojo@schmitz-digital.de>2012-09-08 16:54:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-09 03:35:19 (GMT)
commit7f9e848cf82311792ccfb286e64846fe6f3d5476 (patch)
treea1136b10618acd9336dcfe4025b01ad826f1fa11 /git-compat-util.h
parentfab4b04e4be5ccfdf93e21e7260040bd9e7faedd (diff)
downloadgit-7f9e848cf82311792ccfb286e64846fe6f3d5476.zip
git-7f9e848cf82311792ccfb286e64846fe6f3d5476.tar.gz
git-7f9e848cf82311792ccfb286e64846fe6f3d5476.tar.bz2
Add a no-op setitimer() wrapper
The current code uses setitimer() only for reducing perceived latency. On platforms that lack setitimer() (e.g. HP NonStop), allow builders to say "make NO_SETITIMER=YesPlease" to use a no-op substitute, as doing so would not affect correctness. HP NonStop does provide struct itimerval, but other platforms may not, so this is taken care of in this commit too, by setting NO_STRUCT_ITIMERVAL. Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 35b095e..3515366 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -162,6 +162,17 @@
#define probe_utf8_pathname_composition(a,b)
#endif
+#ifdef NO_STRUCT_ITIMERVAL
+struct itimerval {
+ struct timeval it_interval;
+ struct timeval it_value;
+}
+#endif
+
+#ifdef NO_SETITIMER
+#define setitimer(which,value,ovalue)
+#endif
+
#ifndef NO_LIBGEN_H
#include <libgen.h>
#else