pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Cranford <jcranford@n-able.com>
To: pgsql-odbc@postgresql.org
Subject: v07.03.0200: Make errors if configured --with-odbcver=0x0100
Date: Tue, 08 Feb 2005 11:47:08 -0500
Message-ID: <1107881228.3667.42.camel@host-155.engineering.n-able.com> (raw)

I want to use unixODBC with default ODBC version = 1.0 on Redhat 9.
Configure produces code that does not compile when I specify this
combination.

Make fails to compile info.c when I specify --with-odbcver=0x0100 plus
one or both of unixODBC or iODBC. These combinations of configure
parameters produce code that does not compile:

configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--with-odbcver=0x0100 --with-unixodbc --with-iodbc
configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--with-odbcver=0x0100 --with-unixodbc --without-iodbc
configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--with-odbcver=0x0100 --without-unixodbc --with-iodbc

The only way to avoid the compile errors is to exclude both unixODBC and
iODBC when specifying --with-odbcver=0x0100, or leave out the
--with-odbcver parameter. These combinations of configure parameters
produce code that compiles ok on Redhat 9:

configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--without-unixodbc --with-iodbc
configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--with-unixodbc --without-iodbc
configure -q --prefix=/sandbox/psqlodbc --enable-pthreads
--without-unixodbc --without-iodbc --with-odbcver=0x0100



The problem seems to be with compiler preprocessor directives because
info.c fails to include these missing definitions from isqlext.h.

gcc -DHAVE_CONFIG_H -I. -I/tmp/psqlodbc-07.03.0200 -MT info.lo -MD -MP
-MF .deps/info.Tpo -c /tmp/psqlodbc-07.03.0200/info.c  -fPIC -DPIC -o
info.lo
/tmp/psqlodbc-07.03.0200/info.c: In function `PGAPI_GetInfo':
/tmp/psqlodbc-07.03.0200/info.c:103: `SQL_AT_ADD_COLUMN' undeclared
(first use in this function)
/tmp/psqlodbc-07.03.0200/info.c:103: (Each undeclared identifier is
reported only once
/tmp/psqlodbc-07.03.0200/info.c:103: for each function it appears in.)
/tmp/psqlodbc-07.03.0200/info.c:105: `SQL_AT_DROP_COLUMN' undeclared
(first use in this function)
/tmp/psqlodbc-07.03.0200/info.c:499: `SQL_OJ_CAPABILITIES' undeclared
(first use in this function)
/tmp/psqlodbc-07.03.0200/info.c:504: `SQL_OJ_LEFT' undeclared (first use
in this function)
/tmp/psqlodbc-07.03.0200/info.c:505: `SQL_OJ_RIGHT' undeclared (first
use in this function)
/tmp/psqlodbc-07.03.0200/info.c:506: `SQL_OJ_FULL' undeclared (first use
in this function)
/tmp/psqlodbc-07.03.0200/info.c:507: `SQL_OJ_NESTED' undeclared (first
use in this function)
/tmp/psqlodbc-07.03.0200/info.c:508: `SQL_OJ_NOT_ORDERED' undeclared
(first use in this function)
/tmp/psqlodbc-07.03.0200/info.c:509: `SQL_OJ_INNER' undeclared (first
use in this function)
/tmp/psqlodbc-07.03.0200/info.c:510: `SQL_OJ_ALL_COMPARISON_OPS'
undeclared (first use in this function)
/tmp/psqlodbc-07.03.0200/info.c: In function `PGAPI_ForeignKeys':
/tmp/psqlodbc-07.03.0200/info.c:3849: `SQL_NO_ACTION' undeclared (first
use in this function)
/tmp/psqlodbc-07.03.0200/info.c:3853: `SQL_SET_DEFAULT' undeclared
(first use in this function)
make[1]: *** [info.lo] Error 1


The file psqlodbc.h included by info.c contains the following lines...

#if defined(WIN32) || defined(WITH_UNIXODBC) || defined(WITH_IODBC)
#include <sql.h>
#include <sqlext.h>
#else
#include "iodbc.h"
#include "isql.h"
#include "isqlext.h"
#endif

The missing definitions are in isqlext.h with is excluded if unixODBC or
iODBC are used with ODBCVER=1.0. However, if ODBCVER is not overridden
the definitions are included ok. This implies the problem lies in sql.h
or sqlext.h which probably include isqlext.h indirectly.

Message-ID: <1107881228.3667.42.camel@host-155.engineering.n-able.com>
Permalink:  ../1107881228.3667.42.camel@host-155.engineering.n-able.com/
Also on:    postgresql.org/message-id/1107881228.3667.42.camel@host-155.engineering.n-able.com

 · 

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: jcranford@n-able.com
  Subject: Re: v07.03.0200: Make errors if configured --with-odbcver=0x0100
  In-Reply-To: <1107881228.3667.42.camel@host-155.engineering.n-able.com>
  References: <1107881228.3667.42.camel@host-155.engineering.n-able.com>

* 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