Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a64927f9
Commit
a64927f9
authored
Jun 15, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ecpg cleanups for prototypes.
parent
228c02c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/misc.c
+9
-6
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/include/ecpglib.h
+5
-2
No files found.
src/interfaces/ecpg/ecpglib/misc.c
View file @
a64927f9
/* $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
...
...
src/interfaces/ecpg/include/ecpglib.h
View file @
a64927f9
...
...
@@ -38,6 +38,9 @@ extern "C"
{
#endif
struct
sqlca_t
;
void
ECPGinit_sqlca
(
struct
sqlca_t
*
sqlca
);
void
ECPGdebug
(
int
,
FILE
*
);
bool
ECPGstatus
(
int
,
const
char
*
);
bool
ECPGsetcommit
(
int
,
const
char
*
,
const
char
*
);
...
...
@@ -49,10 +52,10 @@ bool ECPGdisconnect(int, const char *);
bool
ECPGprepare
(
int
,
char
*
,
char
*
);
bool
ECPGdeallocate
(
int
,
char
*
);
bool
ECPGdeallocate_all
(
int
);
char
*
ECPGprepared_statement
(
char
*
);
char
*
ECPGprepared_statement
(
char
*
);
void
ECPGlog
(
const
char
*
format
,...);
char
*
ECPGerrmsg
(
void
);
char
*
ECPGerrmsg
(
void
);
/* print an error message */
void
sqlprint
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment