Re: [HACKERS] Build failure on thrips - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Build failure on thrips
Date
Msg-id 23489.1503764282@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Build failure on thrips  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Build failure on thrips  (Michael Meskes <meskes@postgresql.org>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Build failure on thrips
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] Variable substitution in psql backtick expansion