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
fc8115d4
Commit
fc8115d4
authored
Feb 02, 2007
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up va_list handling. Hopefully this now works on all archs.
parent
98df9001
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+8
-10
No files found.
src/interfaces/ecpg/ChangeLog
View file @
fc8115d4
...
...
@@ -2160,5 +2160,9 @@ Th 25. Jan 17:17:01 CET 2007
- Removed compiler warning due to unneeded unsigned declaration.
- Removed regression test that triggers those libc precision bugs on some archs.
Fr 2. Feb 09:53:48 CET 2007
- Cleaned up va_list handling. Hopefully this now works on all archs.
- Set ecpg library version to 5.3.
- Set ecpg version to 4.3.1.
src/interfaces/ecpg/ecpglib/execute.c
View file @
fc8115d4
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.6
2 2006/10/04 00:30:11 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.6
3 2007/02/02 08:58:23 meskes
Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -135,8 +135,6 @@ ECPGget_variable(va_list APREF, enum ECPGttype type, struct variable * var, bool
}
}
#undef APREF
/*
* create a list of variables
* The variables are listed with input variables preceding outputvariables
...
...
@@ -156,7 +154,7 @@ ECPGget_variable(va_list APREF, enum ECPGttype type, struct variable * var, bool
* ind_offset - indicator offset
*/
static
bool
create_statement
(
int
lineno
,
int
compat
,
int
force_indicator
,
struct
connection
*
connection
,
struct
statement
**
stmt
,
const
char
*
query
,
va_list
ap
)
create_statement
(
int
lineno
,
int
compat
,
int
force_indicator
,
struct
connection
*
connection
,
struct
statement
**
stmt
,
const
char
*
query
,
va_list
APREF
)
{
struct
variable
**
list
=
&
((
*
stmt
)
->
inlist
);
enum
ECPGttype
type
;
...
...
@@ -172,7 +170,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
list
=
&
((
*
stmt
)
->
inlist
);
type
=
va_arg
(
ap
,
enum
ECPGttype
);
type
=
va_arg
(
APREF
,
enum
ECPGttype
);
while
(
type
!=
ECPGt_EORT
)
{
...
...
@@ -186,11 +184,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
if
(
!
(
var
=
(
struct
variable
*
)
ECPGalloc
(
sizeof
(
struct
variable
),
lineno
)))
return
false
;
#if defined(__GNUC__) && (defined (__powerpc__) || defined(__amd64__) || defined(__x86_64__))
ECPGget_variable
(
ap
,
type
,
var
,
true
);
#else
ECPGget_variable
(
&
ap
,
type
,
var
,
true
);
#endif
/* if variable is NULL, the statement hasn't been prepared */
if
(
var
->
pointer
==
NULL
)
...
...
@@ -208,7 +202,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
ptr
->
next
=
var
;
}
type
=
va_arg
(
ap
,
enum
ECPGttype
);
type
=
va_arg
(
APREF
,
enum
ECPGttype
);
}
return
(
true
);
...
...
@@ -1545,7 +1539,11 @@ ECPGdo(int lineno, int compat, int force_indicator, const char *connection_name,
/* construct statement in our own structure */
va_start
(
args
,
query
);
#if defined(__GNUC__) && (defined (__powerpc__) || defined(__amd64__) || defined(__x86_64__))
if
(
create_statement
(
lineno
,
compat
,
force_indicator
,
con
,
&
stmt
,
query
,
args
)
==
false
)
#else
if
(
create_statement
(
lineno
,
compat
,
force_indicator
,
con
,
&
stmt
,
query
,
&
args
)
==
false
)
#endif
{
setlocale
(
LC_NUMERIC
,
oldlocale
);
ECPGfree
(
oldlocale
);
...
...
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