Re: qsort vs MSVC build - Mailing list pgsql-hackers

From Tom Lane
Subject Re: qsort vs MSVC build
Date
Msg-id 29687.1161280584@sss.pgh.pa.us
Whole thread Raw
In response to qsort vs MSVC build  ("Magnus Hagander" <mha@sollentuna.net>)
Responses Re: qsort vs MSVC build  ("Magnus Hagander" <mha@sollentuna.net>)
Re: qsort vs MSVC build  (Martijn van Oosterhout <kleptog@svana.org>)
Re: qsort vs MSVC build  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
"Magnus Hagander" <mha@sollentuna.net> writes:
> I just tried a rebuild of the MSVC stuff, and got the following error.
> Any ideas on the best way to fix that?

> 1>.\src\port\qsort.c(53) : warning C4005: 'min' : macro redefinition
>         C:\Program Files\Microsoft Visual Studio

This is fixed already in HEAD.

> MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _qsort already defined in
> qsort.obj

Hmm.  I've been seeing related complaints on Darwin, but they were just
warnings (about our qsort conflicting with the one in libc).

Is it worth renaming our qsort to pg_qsort to avoid this?  (I'd be
inclined to do that via a macro "#define qsort pg_qsort", not by running
around and changing all the code.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: CVS repository rsync
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Adminpack build fix