1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Switch over to using our own qsort() all the time, as has been proposed

repeatedly.  Now that we don't have to worry about memory leaks from
glibc's qsort, we can safely put CHECK_FOR_INTERRUPTS into the tuplesort
comparators, as was requested a couple months ago.  Also, get rid of
non-reentrancy and an extra level of function call in tuplesort.c by
providing a variant qsort_arg() API that passes an extra void * argument
through to the comparison routine.  (We might want to use that in other
places too, I didn't look yet.)
This commit is contained in:
Tom Lane
2006-10-03 22:18:23 +00:00
parent ed80f5701b
commit 6edd2b4a91
7 changed files with 248 additions and 72 deletions

15
configure vendored
View File

@ -14951,21 +14951,6 @@ case $host_os in bsdi*|netbsd*)
ac_cv_func_fseeko=yes
esac
# Solaris has a very slow qsort in certain cases, so we replace it:
# http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
# Supposedly it is fixed in Solaris, but not sure which version, and
# no confirmed testing. 2005-12-16
if test "$PORTNAME" = "solaris"; then
case $LIBOBJS in
"qsort.$ac_objext" | \
*" qsort.$ac_objext" | \
"qsort.$ac_objext "* | \
*" qsort.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
esac
fi
# Win32 support
if test "$PORTNAME" = "win32"; then
case $LIBOBJS in