Tom Lane wrote:

Andrew Dunstan <[EMAIL PROTECTED]> writes:


This patch fixes contrib so that it compiles under windows without warnings about redefines for min, max, V_UNKNOWN and IDIGNORE



Surely this is wrong. You might be able to assume that Windows'
definitions for min/max are the same as what this code is expecting,



I checked and they are, fairly much character for character I think.

but it's a lot bigger stretch to assume that for the other ones.



I didn't. In one case (IDIGNORE) I changed the name of the macro to avoid the conflict, and in the other (V_UKNOWN) I removed the Windows def which has no applicability in that context (the Windows version comes from oleauto.h). Both of these cases occur in .c files and have no effects outside these files.


(Does tsearch2 still *work* after you change it this way??)



I don't know, because (as you know) tsearch2 is currently busted at the link stage on Windows, and I don't know how to fix it - I was hoping someone would have jumped on that by now. But by analysis it should not have changed the behaviour at all.


The right thing for the min/max macros is to get rid of them anyway,
and use the Min/Max macros from c.h.



That's a fair point. I'll look at that.

cheers

andrew


---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Reply via email to