Skip to Content.
Sympa Menu

freetds - Re: [freetds] RETCODE conflict

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <brian.bruns AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] RETCODE conflict
  • Date: Wed, 30 Mar 2005 07:02:09 -0500

This is a long standing problem with dblib. The other nice type def
is BYTE which clashes with a number of other libraries. You can use
both in one program as long as you don't include them in the same .c
file. ctlib should not suffer these problems.

Brian

On Wed, 30 Mar 2005 08:39:50 +0200, ZIGLIO, Frediano, VF-IT
<Frediano.Ziglio AT vodafone.com> wrote:
> >
> > Has any else run into a typedef conflict running FreeTDS with
> > unixODBC
> > and trying to include both FreeTDS's sqldb.h (which includes sybdb.h)
> > and unixODBC's sqltypes.h? sqltypes.h defines RETCODE as a signed
> > short. sybdb.h defines RETCODE as an int. Any suggested
> > work arounds?
> >
> > Frederick N. Brier
> > Multideck Corporation
> >
>
> Both use typedefs (windows too).
>
> A possible solution can be
>
> #include <sql.h>
> #define RETCODE DBRETCODE
> #include <sybdb.h>
> #undef RETCODE
>
> DBRETCODE ret; // dblib return code
> RETCODE rc; // ODBC return code
>
> However I don't find the reason to include both dblib and ODBC...
>
> freddy77
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page