Skip to content

Commit a64927f

Browse files
committed
Ecpg cleanups for prototypes.
1 parent 228c02c commit a64927f

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/interfaces/ecpg/ecpglib/misc.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.3 2003/06/15 04:07:58 momjian Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.4 2003/06/15 04:56:45 momjian Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -78,7 +78,8 @@ static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
7878
static int simple_debug = 0;
7979
static FILE *debugstream = NULL;
8080

81-
void ECPGinit_sqlca(struct sqlca_t *sqlca)
81+
void
82+
ECPGinit_sqlca(struct sqlca_t *sqlca)
8283
{
8384
memcpy((char *)sqlca, (char *)&sqlca_init, sizeof(struct sqlca_t));
8485
}
@@ -98,25 +99,27 @@ ECPGinit(const struct connection * con, const char *connection_name, const int l
9899
}
99100

100101
#ifdef USE_THREADS
101-
static void ecpg_sqlca_key_init(void)
102+
static void
103+
ecpg_sqlca_key_init(void)
102104
{
103105
pthread_key_create(&sqlca_key, NULL);
104106
}
105107
#endif
106108

107-
struct sqlca_t *ECPGget_sqlca(void)
109+
struct sqlca_t *
110+
ECPGget_sqlca(void)
108111
{
109112
#ifdef USE_THREADS
110113
struct sqlca_t *sqlca;
111114

112115
pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
113116

114-
sqlca = pthread_getspecific(&sqlca_key);
117+
sqlca = pthread_getspecific(sqlca_key);
115118
if( sqlca == NULL )
116119
{
117120
sqlca = malloc(sizeof(struct sqlca_t));
118121
ECPGinit_sqlca(sqlca);
119-
pthread_setspecific(&sqlca_key, sqlca);
122+
pthread_setspecific(sqlca_key, sqlca);
120123
}
121124
return( sqlca );
122125
#else

src/interfaces/ecpg/include/ecpglib.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ extern "C"
3838
{
3939
#endif
4040

41+
struct sqlca_t;
42+
43+
void ECPGinit_sqlca(struct sqlca_t *sqlca);
4144
void ECPGdebug(int, FILE *);
4245
bool ECPGstatus(int, const char *);
4346
bool ECPGsetcommit(int, const char *, const char *);
@@ -49,10 +52,10 @@ bool ECPGdisconnect(int, const char *);
4952
bool ECPGprepare(int, char *, char *);
5053
bool ECPGdeallocate(int, char *);
5154
bool ECPGdeallocate_all(int);
52-
char *ECPGprepared_statement(char *);
55+
char *ECPGprepared_statement(char *);
5356

5457
void ECPGlog(const char *format,...);
55-
char *ECPGerrmsg(void);
58+
char *ECPGerrmsg(void);
5659

5760
/* print an error message */
5861
void sqlprint(void);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy