diff options
author | Stefan-W. Hahn <stefan.hahn@s-hahn.de> | 2007-01-09 22:04:12 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-09 16:40:40 -0800 |
commit | 6900679c2f6d937a5a6ef616869c8887690ad19d (patch) | |
tree | 138e2f17ba6cd89646c5098ce526e51a4dce5359 /Makefile | |
parent | 0bdb28c9ccd85b1c606664154b6f6d39a4c315fd (diff) | |
download | git-6900679c2f6d937a5a6ef616869c8887690ad19d.tar.gz |
Replacing the system call pread() with lseek()/xread()/lseek() sequence.
Using cygwin with cygwin.dll before 1.5.22 the system call pread() is buggy.
This patch introduces NO_PREAD. If NO_PREAD is set git uses a sequence of
lseek()/xread()/lseek() to emulate pread.
Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -69,6 +69,9 @@ all: # # Define NO_MMAP if you want to avoid mmap. # +# Define NO_PREAD if you have a problem with pread() system call (e.g. +# cygwin.dll before v1.5.22). +# # Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is # generally faster on your platform than accessing the working directory. # @@ -523,6 +526,10 @@ ifdef NO_MMAP COMPAT_CFLAGS += -DNO_MMAP COMPAT_OBJS += compat/mmap.o endif +ifdef NO_PREAD + COMPAT_CFLAGS += -DNO_PREAD + COMPAT_OBJS += compat/pread.o +endif ifdef NO_FAST_WORKING_DIRECTORY BASIC_CFLAGS += -DNO_FAST_WORKING_DIRECTORY endif |