[freetds] Avoid installing tdsiconv.h

ZIGLIO Frediano Frediano.Ziglio at vodafone.com
Tue Jul 29 17:26:40 EDT 2003


This small patch should solve the problem...

freddy77
-------------- next part --------------
Index: include/tds.h
===================================================================
RCS file: /cvsroot/freetds/freetds/include/tds.h,v
retrieving revision 1.135
diff -u -1 -0 -b -r1.135 tds.h
--- include/tds.h	13 Jul 2003 16:06:02 -0000	1.135
+++ include/tds.h	29 Jul 2003 14:23:32 -0000
@@ -23,28 +23,23 @@
 static char rcsid_tds_h[]=
 	"$Id: tds.h,v 1.135 2003/07/13 16:06:02 freddy77 Exp $";
 static void *no_unused_tds_h_warn[] = {
 	rcsid_tds_h,
 	no_unused_tds_h_warn};
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <time.h>
 
-#if HAVE_ICONV
-#include <iconv.h>
 /* forward declaration */
 typedef struct tdsiconvinfo TDSICONVINFO;
 typedef struct tds_socket  TDSSOCKET;
-#else
-#include <tdsiconv.h>
-#endif
 
 #include "tdsver.h"
 #include "tds_sysdep_public.h"
 #ifdef _FREETDS_LIBRARY_SOURCE
 #include "tds_sysdep_private.h"
 #endif /* _FREETDS_LIBRARY_SOURCE */
 
 #ifdef __cplusplus
 extern "C" {
 #endif 
@@ -681,44 +676,20 @@
 	TDS_USMALLINT   flags;      
 	TDS_UCHAR	charset_id; /* or zero */
 } TDS8_COLLATION;
 
 /* SF stands for "sort flag" */
 #define TDS_SF_BIN                   (TDS_USMALLINT) 0x100
 #define TDS_SF_WIDTH_INSENSITIVE     (TDS_USMALLINT) 0x080
 #define TDS_SF_KATATYPE_INSENSITIVE  (TDS_USMALLINT) 0x040
 #define TDS_SF_ACCENT_SENSITIVE      (TDS_USMALLINT) 0x020
 #define TDS_SF_CASE_INSENSITIVE      (TDS_USMALLINT) 0x010
-
-
-/**
- * Information relevant to libiconv.  The name is an iconv name, not 
- * the same as found in master..syslanguages. 
- */ 
-typedef struct _tds_encoding 
-{
-	char name[64];
-	unsigned char min_bytes_per_char;
-	unsigned char max_bytes_per_char;
-} TDS_ENCODING;
-
-struct tdsiconvinfo
-{
-	TDS_ENCODING client_charset;
-	TDS_ENCODING server_charset;
-	iconv_t to_wire;   /* conversion from client charset to server's format */
-	iconv_t from_wire; /* conversion from server's format to client charset */
-#define TDS_ENCODING_INDIRECT 1
-	/* ^^^ As of June 2003, no reference to this macro 
-	 * It's just a TODO... freddy77 */
-	unsigned int flags;
-};
 
 
 enum {TDS_SYSNAME_SIZE= 512};
 /** 
  * Metadata about columns in regular and compute rows 
  */ 
 typedef struct tds_column_info {
 	TDS_SMALLINT column_type;	/**< This type can be different from wire type because 
 	 				 * conversion (e.g. UCS-2->Ascii) can be applied.    
 					 * I'm beginning to wonder about the wisdom of this, however. 
Index: include/tdsiconv.h
===================================================================
RCS file: /cvsroot/freetds/freetds/include/tdsiconv.h,v
retrieving revision 1.18
diff -u -1 -0 -b -r1.18 tdsiconv.h
--- include/tdsiconv.h	5 Jul 2003 15:09:15 -0000	1.18
+++ include/tdsiconv.h	29 Jul 2003 14:23:32 -0000
@@ -87,20 +87,43 @@
 {
 	const char *alias;
 	int canonic;
 } CHARACTER_SET_ALIAS;
 
 /* we use ICONV_CONST for tds_iconv(), even if we don't have iconv() */
 #ifndef ICONV_CONST
 # define ICONV_CONST const
 #endif
 
+/**
+ * Information relevant to libiconv.  The name is an iconv name, not 
+ * the same as found in master..syslanguages. 
+ */ 
+typedef struct _tds_encoding 
+{
+	char name[64];
+	unsigned char min_bytes_per_char;
+	unsigned char max_bytes_per_char;
+} TDS_ENCODING;
+
+struct tdsiconvinfo
+{
+	TDS_ENCODING client_charset;
+	TDS_ENCODING server_charset;
+	iconv_t to_wire;   /* conversion from client charset to server's format */
+	iconv_t from_wire; /* conversion from server's format to client charset */
+#define TDS_ENCODING_INDIRECT 1
+	/* ^^^ As of June 2003, no reference to this macro 
+	 * It's just a TODO... freddy77 */
+	unsigned int flags;
+};
+
 size_t tds_iconv_fread(iconv_t cd, FILE * stream, size_t field_len, size_t term_len, char *outbuf, size_t *outbytesleft);
 size_t tds_iconv (TDSSOCKET *tds, const TDSICONVINFO *iconv_info, TDS_ICONV_DIRECTION io, 
 		  const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
 const char * tds_canonical_charset_name(const char *charset_name);
 const char * tds_sybase_charset_name(const char *charset_name);
 
 #ifdef __cplusplus
 }
 #endif
 


More information about the FreeTDS mailing list