Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita64927f

Browse files
committed
Ecpg cleanups for prototypes.
1 parent228c02c commita64927f

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
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -78,7 +78,8 @@ static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
7878
staticintsimple_debug=0;
7979
staticFILE*debugstream=NULL;
8080

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

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

107-
structsqlca_t*ECPGget_sqlca(void)
109+
structsqlca_t*
110+
ECPGget_sqlca(void)
108111
{
109112
#ifdefUSE_THREADS
110113
structsqlca_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(structsqlca_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+
structsqlca_t;
42+
43+
voidECPGinit_sqlca(structsqlca_t*sqlca);
4144
voidECPGdebug(int,FILE*);
4245
boolECPGstatus(int,constchar*);
4346
boolECPGsetcommit(int,constchar*,constchar*);
@@ -49,10 +52,10 @@ boolECPGdisconnect(int, const char *);
4952
boolECPGprepare(int,char*,char*);
5053
boolECPGdeallocate(int,char*);
5154
boolECPGdeallocate_all(int);
52-
char*ECPGprepared_statement(char*);
55+
char*ECPGprepared_statement(char*);
5356

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp