qsort->pg_qsort in 8.2

Started by Jan Wieckabout 19 years ago4 messages
#1Jan Wieck
JanWieck@Yahoo.com

since rev. 1.105 of include/port.h all files that inlcude postgres_fe.h
are forced to use pg_qsort() instead of qsort. Was that intended?

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jan Wieck (#1)
Re: qsort->pg_qsort in 8.2

Jan Wieck <JanWieck@Yahoo.com> writes:

since rev. 1.105 of include/port.h all files that inlcude postgres_fe.h
are forced to use pg_qsort() instead of qsort. Was that intended?

Is it a problem? If you really want the platform qsort you can #undef
qsort, but I don't entirely see why you would.

regards, tom lane

#3Jan Wieck
JanWieck@Yahoo.com
In reply to: Tom Lane (#2)
Re: qsort->pg_qsort in 8.2

On 10/27/2006 3:47 PM, Tom Lane wrote:

Jan Wieck <JanWieck@Yahoo.com> writes:

since rev. 1.105 of include/port.h all files that inlcude postgres_fe.h
are forced to use pg_qsort() instead of qsort. Was that intended?

Is it a problem? If you really want the platform qsort you can #undef
qsort, but I don't entirely see why you would.

It forces client programs to link against libpgport, which they didn't
have to before.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jan Wieck (#3)
Re: qsort->pg_qsort in 8.2

Jan Wieck <JanWieck@Yahoo.com> writes:

On 10/27/2006 3:47 PM, Tom Lane wrote:

Is it a problem? If you really want the platform qsort you can #undef
qsort, but I don't entirely see why you would.

It forces client programs to link against libpgport, which they didn't
have to before.

Client programs that aren't part of Postgres have no business including
postgres_fe.h, and in any case the inclusion of port.h forces you to buy
into libpgport, no? This is hardly the only substitute function we have.

regards, tom lane