Re: [HACKERS] Build failure on thrips
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Build failure on thrips |
Дата | |
Msg-id | 23489.1503764282@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Build failure on thrips (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Build failure on thrips
|
Список | pgsql-hackers |
I wrote: > thrips is showing some weird syntax errors that I suspect mean it's > misinterpreting "_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);" > as a declaration. Actually, looking closer, isn't the problem that you've stuck a function call into the midst of declarations? Some compilers will allow that, but it's not valid C90. You probably just need to move the call down past "EXEC SQL END DECLARE SECTION". > So what it looks like to me is that either that function isn't > available on all Windows versions, or there's some other header > you need to include to get it on some versions. Microsoft's own documentation contradicts that: https://msdn.microsoft.com/en-us/library/26c0tb7x(v=vs.80).aspx So I'm not sure why the undefined-function results on frogmouth and jacana, although I notice they are using gcc not MSVC. Unless someone has a better idea, I'd suggest working around that like so: #ifdef WIN32 #ifdef _MSC_VER /* requires MSVC */ _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); #endif #endif regards, tom lane
В списке pgsql-hackers по дате отправления: