aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-16 18:11:10 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-16 18:11:47 -0800
commitf8732c5596eb58d0daafdd61355e59831a95ae2e (patch)
treee2ba2efd1d5670d8920feee282581bc0cd989851 /Makefile
parent2ac4b4b2228f3ef996db7b07aea74c4b1a796f38 (diff)
parent43fe901b71f81cdff142048dfc27e492c445d225 (diff)
downloadgit-f8732c5596eb58d0daafdd61355e59831a95ae2e.tar.gz
git-f8732c5596eb58d0daafdd61355e59831a95ae2e.tar.xz
Merge branch 'bd/qsort'
* bd/qsort: compat: Add simplified merge sort implementation from glibc
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d288378aa..83c359acd 100644
--- a/Makefile
+++ b/Makefile
@@ -137,6 +137,10 @@ all::
# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit
# parallel delta searching when packing objects.
#
+# Define INTERNAL_QSORT to use Git's implementation of qsort(), which
+# is a simplified version of the merge sort used in glibc. This is
+# recommended if Git triggers O(n^2) behavior in your platform's qsort().
+#
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -722,6 +726,10 @@ ifdef NO_MEMMEM
COMPAT_CFLAGS += -DNO_MEMMEM
COMPAT_OBJS += compat/memmem.o
endif
+ifdef INTERNAL_QSORT
+ COMPAT_CFLAGS += -DINTERNAL_QSORT
+ COMPAT_OBJS += compat/qsort.o
+endif
ifdef THREADED_DELTA_SEARCH
BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH