[freetds] iconv

Lowden, James K LowdenJK at bernstein.com
Thu May 15 12:50:08 EDT 2003

> From: Patrick Welche [mailto:prlw1 at newn.cam.ac.uk]
> Sent: May 15, 2003 11:52 AM
> With fresh cvs code, I get:
> In file included from mem.c:39:
> ../../include/tdsiconv.h:53: parse error before `cd'
> ../../include/tdsiconv.h:53: warning: function declaration 
> isn't a prototype
> essentially because tdsiconv.h uses iconv_t. I don't have 
> libiconv installed,
> so configure quite rightly doesn't define HAVE_ICONV. So, is 
> iconv required
> for freetds? If so, then maybe a note in README or INSTALL, 
> else it's time
> to put some cunning HAVE_ICONVs about the place.. (I cheated and added
> typedef void* iconv_t;
> to tdsiconv.h but got many warnings compiling iconv.c - I 
> don't thing config.h is included in it either...)

Hi Patrick, 

You shouldn't need iconv to use FreeTDS.  That's an accidental state of
affairs.  I don't think your fix is a cheat; I think it's correct.
Something like 

#ifndef iconv_t
	typedef void* iconv_t;

in tdsiconv.h seems perfectly valid to me.  We want to pass iconv_t handles
to functions e.g. tds_iconv_fread(), and we want tds_iconv() to work in the
absence of iconv.  

Thanks for the report.  

The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.

More information about the FreeTDS mailing list