mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Makefile: introduce NO_PTHREADS
This introduces make variable NO_PTHREADS for platforms that lack the support for pthreads library or people who do not want to use it for whatever reason. When defined, it makes the multi-threaded index preloading into a no-op, and also disables threaded delta searching by pack-objects. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Tested-by: Johannes Sixt <j6t@kdbg.org> (AIX 4.3.x) Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
* Copyright (C) 2008 Linus Torvalds
|
||||
*/
|
||||
#include "cache.h"
|
||||
|
||||
#ifdef NO_PTHREADS
|
||||
static void preload_index(struct index_state *index, const char **pathspec)
|
||||
{
|
||||
; /* nothing */
|
||||
}
|
||||
#else
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/*
|
||||
@@ -81,6 +89,7 @@ static void preload_index(struct index_state *index, const char **pathspec)
|
||||
die("unable to join threaded lstat");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int read_index_preload(struct index_state *index, const char **pathspec)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user