1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Hopefully fixed some stuff that causes Windows builds to fail.

This commit is contained in:
Michael Meskes
2007-10-03 08:55:23 +00:00
parent 6d673a63ed
commit c4a6c2f871
9 changed files with 70 additions and 61 deletions

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.45 2007/10/02 09:49:59 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.46 2007/10/03 08:55:22 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@ -11,17 +11,15 @@
#include "sqlca.h"
#ifdef ENABLE_THREAD_SAFETY
NON_EXEC_STATIC pthread_mutex_t connections_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t connections_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_key_t actual_connection_key;
#ifndef WIN32
static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT;
#endif
#endif
static struct connection *actual_connection = NULL;
static struct connection *all_connections = NULL;
#ifdef ENABLE_THREAD_SAFETY
NON_EXEC_STATIC void
static void
ecpg_actual_connection_init(void)
{
pthread_key_create(&actual_connection_key, NULL);
@ -447,7 +445,6 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
this->cache_head = NULL;
this->prep_stmts = NULL;
this->descriptors = NULL;
if (all_connections == NULL)
this->next = NULL;