freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Frederick N. Brier" <multideck AT comcast.net>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] RETCODE conflict
- Date: Wed, 30 Mar 2005 07:28:45 -0500
Does #undef work on a typedef? I would have thought #undef is a symbol in the preprocessor and typedef is a symbol in the compiler's symbol table. What I am trying to do is call bcp_* routines in the dblib using an ODBC connection. The approach is put together a DBPROCESS struct from the various TDS structs pointed to by the ODBC based structs since both dblib/bcp* functions in the dblib as well as the ODBC library are built on the same underlying TDS structs and methods. I made most of the changes yesterday and will test it today. If the typedef(s) were changed to #define(s) then I could potentially use the trick described below. In the meantime, <wince> I did a global search and replace of RETCODE to TDSRETCODE in the FreeTDS source base <sigh>. Other than that, I added a bulk_copy_enabled flag to the _hattr struct and methods to set/get it via the OBDC call, as well as use the flag on connection creation, by setting the value in the TDS connection info struct, which is then used in the assembly of the packet to the server.
Fred.
ZIGLIO, Frediano, VF-IT 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
-
[freetds] RETCODE conflict,
Frederick N. Brier, 03/29/2005
- <Possible follow-up(s)>
-
RE: [freetds] RETCODE conflict,
ZIGLIO, Frediano, VF-IT, 03/30/2005
- Re: [freetds] RETCODE conflict, Brian Bruns, 03/30/2005
-
Re: [freetds] RETCODE conflict,
Frederick N. Brier, 03/30/2005
- Re: [freetds] RETCODE conflict, James K. Lowden, 03/30/2005
Archive powered by MHonArc 2.6.24.