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>
This commit is contained in:

committed by
Junio C Hamano

parent
fab4b04e4b
commit
7f9e848cf8
@ -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
|
||||
|
Reference in New Issue
Block a user