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

Commitfc8115d

Browse files
author
Michael Meskes
committed
Cleaned up va_list handling. Hopefully this now works on all archs.
1 parent98df900 commitfc8115d

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,5 +2160,9 @@ Th 25. Jan 17:17:01 CET 2007
21602160

21612161
- Removed compiler warning due to unneeded unsigned declaration.
21622162
- Removed regression test that triggers those libc precision bugs on some archs.
2163+
2164+
Fr 2. Feb 09:53:48 CET 2007
2165+
2166+
- Cleaned up va_list handling. Hopefully this now works on all archs.
21632167
- Set ecpg library version to 5.3.
21642168
- Set ecpg version to 4.3.1.

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.62 2006/10/04 00:30:11 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.63 2007/02/02 08:58:23 meskes Exp $ */
22

33
/*
44
* 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
135135
}
136136
}
137137

138-
#undef APREF
139-
140138
/*
141139
* create a list of variables
142140
* 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
156154
* ind_offset - indicator offset
157155
*/
158156
staticbool
159-
create_statement(intlineno,intcompat,intforce_indicator,structconnection*connection,structstatement**stmt,constchar*query,va_listap)
157+
create_statement(intlineno,intcompat,intforce_indicator,structconnection*connection,structstatement**stmt,constchar*query,va_listAPREF)
160158
{
161159
structvariable**list=&((*stmt)->inlist);
162160
enumECPGttypetype;
@@ -172,7 +170,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
172170

173171
list=&((*stmt)->inlist);
174172

175-
type=va_arg(ap,enumECPGttype);
173+
type=va_arg(APREF,enumECPGttype);
176174

177175
while (type!=ECPGt_EORT)
178176
{
@@ -186,11 +184,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
186184
if (!(var= (structvariable*)ECPGalloc(sizeof(structvariable),lineno)))
187185
return false;
188186

189-
#if defined(__GNUC__)&& (defined (__powerpc__)|| defined(__amd64__)|| defined(__x86_64__))
190187
ECPGget_variable(ap,type,var, true);
191-
#else
192-
ECPGget_variable(&ap,type,var, true);
193-
#endif
194188

195189
/* if variable is NULL, the statement hasn't been prepared */
196190
if (var->pointer==NULL)
@@ -208,7 +202,7 @@ create_statement(int lineno, int compat, int force_indicator, struct connection
208202
ptr->next=var;
209203
}
210204

211-
type=va_arg(ap,enumECPGttype);
205+
type=va_arg(APREF,enumECPGttype);
212206
}
213207

214208
return (true);
@@ -1545,7 +1539,11 @@ ECPGdo(int lineno, int compat, int force_indicator, const char *connection_name,
15451539

15461540
/* construct statement in our own structure */
15471541
va_start(args,query);
1542+
#if defined(__GNUC__)&& (defined (__powerpc__)|| defined(__amd64__)|| defined(__x86_64__))
15481543
if (create_statement(lineno,compat,force_indicator,con,&stmt,query,args)== false)
1544+
#else
1545+
if (create_statement(lineno,compat,force_indicator,con,&stmt,query,&args)== false)
1546+
#endif
15491547
{
15501548
setlocale(LC_NUMERIC,oldlocale);
15511549
ECPGfree(oldlocale);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp