[freetds] unixODBC 2.2.14 headers wrong?
Sebastien FLAESCH
sf at 4js.com
Thu Feb 19 04:25:38 EST 2009
Hi all,
I know this is maybe not the right mailing-list to talk about that,
but I think it's important for any ODBC users:
I have just downloaded unixODBC sources 2.2.14, did a configure/make
and here is what I get in the unixodbc_conf.h header file:
#ifndef HAVE_UNISTD_H
#define HAVE_UNISTD_H
#endif
#ifndef HAVE_PWD_H
#define HAVE_PWD_H
#endif
#ifndef HAVE_SYS_TYPES_H
#define HAVE_SYS_TYPES_H
#endif
#ifndef HAVE_LONG_LONG
#define HAVE_LONG_LONG
#endif
#ifndef ODBCINT64
#define ODBCINT64 <---- ????
#endif
#ifndef UODBCINT64
#define UODBCINT64 <---- ????
#endif
#ifndef SIZEOF_LONG_INT
#define SIZEOF_LONG_INT 4
#endif
Actually, ODBCINT64 and UODBCINT64 are defined, but as "nothing"...
Later, in sqltypes.h, you can see lines like:
#ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT;
#endif
#ifdef UODBCINT64
typedef UODBCINT64 SQLUBIGINT;
#endif
There are some lines in sqltypes.h to define a default for these
constants, but since unixodbc_conf.h defines them, I would rather
have expected something like this in unixodbc_conf.h:
#ifndef ODBCINT64
#define ODBCINT64 long long
#endif
#ifndef UODBCINT64
#define UODBCINT64 unsigned long long
#endif
This can be critical I think... configure script complete without
any error, but later on, when you compile your sources, you get
warning like:
/usr/include/sqltypes.h:400: error: type defaults to 'int' in declaration of 'SQLBIGINT'
/usr/include/sqltypes.h:403: error: type defaults to 'int' in declaration of 'SQLUBIGINT'
Did I miss something here?
Cheers,
Seb
More information about the FreeTDS
mailing list