summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-07-11 12:57:28 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-11 12:57:28 -0700
commit2e1e8efcc7ec25c8253d56a9b259e711290b3572 (patch)
treefa1e62f383060f1d62e6146be31547447c93d9d2 /builtin/index-pack.c
parentMerge branch 'th/diff-no-index-fixes' into maint (diff)
parentindex-pack: Disable threading on cygwin (diff)
downloadtgif-2e1e8efcc7ec25c8253d56a9b259e711290b3572.tar.xz
Merge branch 'rj/platform-pread-may-be-thread-unsafe' into maint
On Cygwin, the platform pread(2) is not thread safe, just like our own compat/ emulation, and cannot be used in the index-pack program. Makefile variable NO_THREAD_SAFE_PREAD can be defined to avoid use of this function in a threaded program. * rj/platform-pread-may-be-thread-unsafe: index-pack: Disable threading on cygwin
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index dc2cfe6e6f..470547835c 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -39,8 +39,8 @@ struct base_data {
int ofs_first, ofs_last;
};
-#if !defined(NO_PTHREADS) && defined(NO_PREAD)
-/* NO_PREAD uses compat/pread.c, which is not thread-safe. Disable threading. */
+#if !defined(NO_PTHREADS) && defined(NO_THREAD_SAFE_PREAD)
+/* pread() emulation is not thread-safe. Disable threading. */
#define NO_PTHREADS
#endif