[freetds] CS_INT size bug

Norbert Sendetzky norbert at linuxnetworks.de
Sat Sep 2 06:04:59 EDT 2006


Hi all

The 32 bit types CS_INT and tds_sysdep_int32_type are incorrectly defined 
to "int", which is only true for 32bit plattforms. The int type is autosizing 
from 16 to 64 bit depending on the plattform and to get real 32 bit 
types, "long" must be used instead. Exceptions seem to be Alpha and AIX, 
where int and long are defined the other way round.

--- freetds-0.64/include/tds_sysdep_public.h    2006-08-19 15:33:07.000000000 
+0200
+++ freetds-0.64.new/include/tds_sysdep_public.h        2006-09-02 
11:53:21.000000000 +0200
@@ -46,7 +46,7 @@
 #endif                         /* !tds_sysdep_int16_type */

 #ifndef tds_sysdep_int32_type
-#define tds_sysdep_int32_type int      /* 32-bit int */
+#define tds_sysdep_int32_type long     /* 32-bit int */
 #endif                         /* !tds_sysdep_int32_type */

 #ifndef tds_sysdep_int64_type


Norbert
-- 
OpenPGP public key
http://www.linuxnetworks.de/norbert.pubkey.asc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20060902/5d327096/attachment.bin 


More information about the FreeTDS mailing list