Re: snprintf causes regression tests to fail
От | pgsql@mohawksoft.com |
---|---|
Тема | Re: snprintf causes regression tests to fail |
Дата | |
Msg-id | 16751.24.91.171.78.1109765377.squirrel@mail.mohawksoft.com обсуждение исходный текст |
Ответ на | Re: snprintf causes regression tests to fail (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-hackers |
> > The big question is why our own vsnprintf() is not being called from > snprintf() in our port file. > I have seen this "problem" before, well, it isn't really a problem I guess. I'm not sure of the gcc compiler options, but.... On the Microsoft compiler if you specify the option "/Gy" it separates the functions within the object file, that way you don't load all the functions from the object if they are not needed. If, however, you create a function with the same name as another function, and one is declared in an object compiled with the "/Gy" option, and the other's object file is not, then if you also use a different function or reference variable in the object file compiled without the "/Gy" option, then the conflicting function will probably be used. Make sense? I would suggest using macro to redefine snprintf and vnsprintf to avoid the issue: #define snprintf pg_snprintf #define vnsprintf pg_vnsprintf
В списке pgsql-hackers по дате отправления: