aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoachim Schmitz <jojo@schmitz-digital.de>2012-09-08 18:54:34 +0200
committerJunio C Hamano <gitster@pobox.com>2012-09-08 20:35:19 -0700
commit7f9e848cf82311792ccfb286e64846fe6f3d5476 (patch)
treea1136b10618acd9336dcfe4025b01ad826f1fa11 /Makefile
parentfab4b04e4be5ccfdf93e21e7260040bd9e7faedd (diff)
downloadgit-7f9e848cf82311792ccfb286e64846fe6f3d5476.tar.gz
git-7f9e848cf82311792ccfb286e64846fe6f3d5476.tar.xz
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 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6b0c961d3..f93bf1959 100644
--- a/Makefile
+++ b/Makefile
@@ -157,6 +157,11 @@ all::
# Define NO_PREAD if you have a problem with pread() system call (e.g.
# cygwin1.dll before v1.5.22).
#
+# Define NO_SETITIMER if you don't have setitimer()
+#
+# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval
+# This also implies NO_SETITIMER
+#
# Define NO_THREAD_SAFE_PREAD if your pread() implementation is not
# thread-safe. (e.g. compat/pread.c or cygwin)
#
@@ -1670,6 +1675,13 @@ endif
ifdef OBJECT_CREATION_USES_RENAMES
COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1
endif
+ifdef NO_STRUCT_ITIMERVAL
+ COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL
+ NO_SETITIMER=YesPlease
+endif
+ifdef NO_SETITIMER
+ COMPAT_CFLAGS += -DNO_SETITIMER
+endif
ifdef NO_PREAD
COMPAT_CFLAGS += -DNO_PREAD
COMPAT_OBJS += compat/pread.o