Re: fix windows contrib compile warnings for redefined
От | Andrew Dunstan |
---|---|
Тема | Re: fix windows contrib compile warnings for redefined |
Дата | |
Msg-id | 4178026E.2020407@dunslane.net обсуждение исходный текст |
Ответ на | Re: fix windows contrib compile warnings for redefined macros (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: fix windows contrib compile warnings for redefined macros
Re: fix windows contrib compile warnings for redefined |
Список | pgsql-patches |
Tom Lane wrote: >Andrew Dunstan <andrew@dunslane.net> 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
В списке pgsql-patches по дате отправления: