index-pack: disable threading if NO_PREAD is defined
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 6 May 2012 12:31:56 +0000 (19:31 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 May 2012 22:48:19 +0000 (15:48 -0700)
commitb038a61020573b1be6e5fc5b2be4485b63a9cbf1
treeaa912176a94ea77819264969f30f905e98d1b1d6
parentb8a2486f1524947f232f657e9f2ebf44e3e7a243
index-pack: disable threading if NO_PREAD is defined

NO_PREAD simulates pread() as a sequence of seek, read, seek in
compat/pread.c. The simulation is not thread-safe because another
thread could move the file offset away in the middle of pread
operation. Do not allow threading in that case.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c