freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] win32 freetds compile issues
- Date: Wed, 6 Oct 2004 11:35:53 +0200
>
> I thought I bring a couple of things to your attention (which
> may or may not
> be considered as issues):
>
>
> 1) typedef unsigned char BOOL; (line 138, include/sybdb.h)
>
> * I believe it conflicts with Visual Studio 6.0 BOOL
> definition (from
> vc98\include\windef.h)
> * also it may conflict with client applications that
> define BOOL (many
> of them do this since there is no BOOL type in C)
> * commenting this line fixes all the compiler complaints :-)
> * maybe a good idea would be to have TDS_BOOL or smth
> like that, if it
> is really needed
>
More on this. BOOL it's used only in DBCOL which it's used only on
dbcolinfo (a MS only function) so you are right, BOOL should be int, not
unsigned char for compatibility. However this break binary compatibility
so this cannot be applied to 0.62, only to 0.63. I think it HAS to be
changed before 0.63 release.
>
> 2) #define TIME_WITH_SYS_TIME 1 (win32/config.h, line 216)
>
> * this causes Visual Studio 6.0 to search for
> <sys/time.h> (as opposed
> to just <time.h>) which I believe does not exist
> * making it 0, fixes the problem
>
However it exists under mingw (and I think cygwin too) so it's better to
defined it if we see gcc.. (Borland compiler do not have sys/time.h too)
>
> 3) #define TDS42 0 (win32/config.h, line 235)
>
> * I have specified TDS50 in the preprocessor definitions
> and it would
> not compile, so it took me some time to realise that TDS42 is actually
> defined somewhere by default :-)
> * may be a better way would be to remove this alltogether
> and have TDS
> version specified as a preprocessor definition, or have #elif
> in dblib.c
> (line 112 and onwards), or #undef all other TDS versions when
> one is defined
>
Yes, you have to undefine TDS42 if you define TDS50... the problem it's
that we test with #if in tds.h and with #ifdef in dblib.c.
> All this is definitely not critical, but, perhaps, convenient? :-)
>
Fix for 1) and 2) are in CVS (tested with DevC++ and msvc6), I didn't
change default protocol version to 5.0 (case 3) ).
freddy77
-
[freetds] win32 freetds compile issues,
Polyanovskyi, Sasha, 10/05/2004
- <Possible follow-up(s)>
- RE: [freetds] win32 freetds compile issues, ZIGLIO, Frediano, VF-IT, 10/06/2004
Archive powered by MHonArc 2.6.24.