aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/misc.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-06-15 04:56:45 +0000
committerBruce Momjian <bruce@momjian.us>2003-06-15 04:56:45 +0000
commita64927f995cb63268eff310217440bdd57a415c1 (patch)
tree5fccb9d620f024ca9a41d3ac61376ce2d66ca437 /src/interfaces/ecpg/ecpglib/misc.c
parent228c02c3e5f91ab1950d89b99f5b798e753d4f29 (diff)
downloadpostgresql-a64927f995cb63268eff310217440bdd57a415c1.tar.gz
postgresql-a64927f995cb63268eff310217440bdd57a415c1.zip
Ecpg cleanups for prototypes.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/misc.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index 5c5128dcef4..ae2e090fe98 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.3 2003/06/15 04:07:58 momjian Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.4 2003/06/15 04:56:45 momjian Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -78,7 +78,8 @@ static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
static int simple_debug = 0;
static FILE *debugstream = NULL;
-void ECPGinit_sqlca(struct sqlca_t *sqlca)
+void
+ECPGinit_sqlca(struct sqlca_t *sqlca)
{
memcpy((char *)sqlca, (char *)&sqlca_init, sizeof(struct sqlca_t));
}
@@ -98,25 +99,27 @@ ECPGinit(const struct connection * con, const char *connection_name, const int l
}
#ifdef USE_THREADS
-static void ecpg_sqlca_key_init(void)
+static void
+ecpg_sqlca_key_init(void)
{
pthread_key_create(&sqlca_key, NULL);
}
#endif
-struct sqlca_t *ECPGget_sqlca(void)
+struct sqlca_t *
+ECPGget_sqlca(void)
{
#ifdef USE_THREADS
struct sqlca_t *sqlca;
pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
- sqlca = pthread_getspecific(&sqlca_key);
+ sqlca = pthread_getspecific(sqlca_key);
if( sqlca == NULL )
{
sqlca = malloc(sizeof(struct sqlca_t));
ECPGinit_sqlca(sqlca);
- pthread_setspecific(&sqlca_key, sqlca);
+ pthread_setspecific(sqlca_key, sqlca);
}
return( sqlca );
#else