pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: pgsql-odbc@postgresql.org
Subject: src/test/dataatexecution-test.c: VOID undeclared
Date: Fri, 1 Nov 2013 23:39:54 +0100
Message-ID: <20131101223954.GF7298@msgid.df7cb.de> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hi,

the testsuite doesn't compile here:

gcc -Wno-pointer-sign src/dataatexecution-test.c src/common.o -o src/dataatexecution-test -lodbc
src/dataatexecution-test.c: In function ‘main’:
src/dataatexecution-test.c:55:10: error: ‘VOID’ undeclared (first use in this function)
         (VOID *) 1, /* param value ptr. For a data-at-exec
          ^
src/dataatexecution-test.c:55:10: note: each undeclared identifier is reported only once for each function it appears in
src/dataatexecution-test.c:55:16: error: expected expression before ‘)’ token
         (VOID *) 1, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:58:9: error: too few arguments to function ‘SQLBindParameter’
         &cbParam1  /* StrLen_or_IndPtr */);
         ^
In file included from src/common.h:10:0,
                 from src/dataatexecution-test.c:5:
/usr/include/sqlext.h:2022:19: note: declared here
 SQLRETURN SQL_API SQLBindParameter(
                   ^
src/dataatexecution-test.c:66:16: error: expected expression before ‘)’ token
         (VOID *) 2, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:69:9: error: too few arguments to function ‘SQLBindParameter’
         &cbParam2  /* StrLen_or_IndPtr */);
         ^
In file included from src/common.h:10:0,
                 from src/dataatexecution-test.c:5:
/usr/include/sqlext.h:2022:19: note: declared here
 SQLRETURN SQL_API SQLBindParameter(
                   ^
src/dataatexecution-test.c:81:26: error: expected expression before ‘)’ token
    if (paramid == (VOID *) 1)
                          ^
src/dataatexecution-test.c:86:31: error: expected expression before ‘)’ token
    else if (paramid == (VOID *) 2)
                               ^
src/dataatexecution-test.c:129:16: error: expected expression before ‘)’ token
         (VOID *) 1, /* param value ptr. For a data-at-exec
                ^
src/dataatexecution-test.c:132:9: error: too few arguments to function ‘SQLBindParameter’
         str_ind_array /* StrLen_or_IndPtr */);
         ^
In file included from src/common.h:10:0,
                 from src/dataatexecution-test.c:5:
/usr/include/sqlext.h:2022:19: note: declared here
 SQLRETURN SQL_API SQLBindParameter(
                   ^
make[1]: *** [src/dataatexecution-test] Fehler 1
make[1]: Leaving directory `/home/myon/psqlodbc-09.02.0100/test'


The attached patch fixes the problem.

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachments:

testsuite2 (text/plain, 1.7K) download --- a/test/src/dataatexecution-test.c +++ b/test/src/dataatexecution-test.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ param1bytes, /* column size */ 0, /* dec digits */ - (VOID *) 1, /* param value ptr. For a data-at-exec + (void *) 1, /* param value ptr. For a data-at-exec * param, this is a "parameter id" */ 0, /* buffer len */ &cbParam1 /* StrLen_or_IndPtr */); @@ -63,7 +63,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ param2bytes, /* column size */ 0, /* dec digits */ - (VOID *) 2, /* param value ptr. For a data-at-exec + (void *) 2, /* param value ptr. For a data-at-exec * param, this is a "parameter id" */ 0, /* buffer len */ &cbParam2 /* StrLen_or_IndPtr */); @@ -78,12 +78,12 @@ int main(int argc, char **argv) paramid = 0; while ((rc = SQLParamData(hstmt, &paramid)) == SQL_NEED_DATA) { - if (paramid == (VOID *) 1) + if (paramid == (void *) 1) { rc = SQLPutData(hstmt, param1, param1bytes); CHECK_STMT_RESULT(rc, "SQLPutData failed", hstmt); } - else if (paramid == (VOID *) 2) + else if (paramid == (void *) 2) { rc = SQLPutData(hstmt, param2, param2bytes); CHECK_STMT_RESULT(rc, "SQLPutData failed", hstmt); @@ -126,7 +126,7 @@ int main(int argc, char **argv) SQL_VARBINARY, /* param type */ 5, /* column size */ 0, /* dec digits */ - (VOID *) 1, /* param value ptr. For a data-at-exec + (void *) 1, /* param value ptr. For a data-at-exec * param, this is "parameter id" */ 0, /* buffer len */ str_ind_array /* StrLen_or_IndPtr */);
signature.asc (application/pgp-signature, 835B) download

view thread (2+ messages)  latest in thread

Message-ID: <20131101223954.GF7298@msgid.df7cb.de>
Permalink:  ../20131101223954.GF7298@msgid.df7cb.de/
Also on:    postgresql.org/message-id/20131101223954.GF7298@msgid.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: myon@debian.org
  Subject: Re: src/test/dataatexecution-test.c: VOID undeclared
  In-Reply-To: <20131101223954.GF7298@msgid.df7cb.de>
  References: <20131101223954.GF7298@msgid.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox