From 2cf91ccb73ce888c44e3751548fb7c77e87335f2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 23 Jan 2019 22:46:45 -0500 Subject: Blind attempt to fix _configthreadlocale() failures on MinGW. Apparently, some builds of MinGW contain a version of _configthreadlocale() that always returns -1, indicating failure. Rather than treating that as a curl-up-and-die condition, soldier on as though the function didn't exist. This leaves us without thread safety on such MinGW versions, but we didn't have it anyway. Discussion: https://postgr.es/m/d06a16bc-52d6-9f0d-2379-21242d7dbe81@2ndQuadrant.com --- src/interfaces/ecpg/ecpglib/descriptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces/ecpg/ecpglib/descriptor.c') diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index aeb33636607..5fca4dde20d 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -519,7 +519,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...) } #ifdef HAVE__CONFIGTHREADLOCALE if (stmt.oldthreadlocale != -1) - _configthreadlocale(stmt.oldthreadlocale); + (void) _configthreadlocale(stmt.oldthreadlocale); #endif #endif } -- cgit v1.2.3