[freetds] what size indicator

James K. Lowden jklowden at schemamania.org
Thu May 27 22:42:21 EDT 2004

typedef struct tds_column
	TDS_SMALLINT *column_nullbind;

blk_bind(CS_BLKDESC * blkdesc, CS_INT item, CS_DATAFMT * datafmt, CS_VOID
* buffer, CS_INT * datalen, CS_SMALLINT * indicator)

dbnullbind(DBPROCESS * dbproc, int column, DBINT * indicator)


As you can see, db-lib defines the nullbind indicator as an address of a
32-bit pointer, and ct-lib a 16-bit pointer.  Compiling db-lib with a
modern compiler will yield complaints.  (I take it yours is pre-modern, or
you have the volume turned down. ;-) )

How best to resolve this?  I think we need to define it as 32-bits in
TDSCOLUMN, and cast the ct-lib down to 16.  I don't think anything else is
safe.  But I thought I'd check.  

Interestingly, the bugger used to be (as you know) CHAR*.  I wonder why I
never saw this warning before.



More information about the FreeTDS mailing list