From: Neil Conway Date: Sun, 15 Jan 2006 22:47:10 +0000 (+0000) Subject: When using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not X-Git-Tag: REL8_1_3~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afe91cae6c45f5f06881651e6cea35972a0d4586;p=postgresql When using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not a va_list. Christof Petig's previous patch made this change, but neglected to update ecpglib/descriptor.c, resulting in a compiler warning (and a likely runtime crash) on AMD64 and PPC. --- diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index 3a8d8ceb29..e81df0e561 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -1,6 +1,6 @@ /* dynamic SQL support routines * - * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.12.6.1 2005/11/30 12:50:37 meskes Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.12.6.2 2006/01/15 22:47:10 neilc Exp $ */ #define POSTGRES_ECPG_INTERNAL @@ -503,7 +503,11 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...) break; type = va_arg(args, enum ECPGttype); +#if defined(__GNUC__) && (defined (__powerpc__) || defined(__amd64__) || defined(__x86_64__)) + ECPGget_variable(args, type, var, false); +#else ECPGget_variable(&args, type, var, false); +#endif switch (itemtype) {