[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] unixODBC 2.2.14 headers wrong?
From:       Frediano Ziglio <freddy77 () gmail ! com>
Date:       2009-02-19 12:43:02
Message-ID: aa1b71110902190443x1940c873gb707f16acf959429 () mail ! gmail ! com
[Download RAW message or body]

2009/2/19 Sebastien FLAESCH <sf@4js.com>:
> 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

I hardly have time to code for FreeTDS :)
This problem is only unixODBC related.

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic