Hi,

i found the source of the problem:
<sqlext.h> automagically includes <sqlucode.h> under etch:

#ifndef __SQLUCODE_H
#include "sqlucode.h"
#endif

but these lines are missing in sarge doesn't.
The ODBCVER is the same under both versions.
The following patch simply adds #include <sqlucode.h> to the my_con.h.
This simply solves the issue under debian sarge and etch.

Carsten



Am Montag, den 19.05.2008, 10:44 +0200 schrieb Henning Westerholt:
> On Friday 16 May 2008, Henning Westerholt wrote:
> > > technically spoken, you're right. But on deb-sarge i get the following
> > > compiling errors:
> > >
> > > res.c: In function `get_columns':
> > > res.c:127: error: `SQL_WLONGVARCHAR' undeclared (first use in this
> > > function)
> > > res.c:127: error: (Each undeclared identifier is reported only once
> > > res.c:127: error: for each function it appears in.)
> > >
> > > The package building for sarge does not work anymore...
> > > I think, there must be some way to cope with this (somehow an "#ifdef"
> > > or something...) in order to keep it compatible with older versions of
> > > linux/unixodbc....
> >
> > Hi Carsten,
> >
> > sarge reached the end of life a few month ago.. But you could check for
> > ODBCVER in sql.h. On my system its "#define ODBCVER 0x0351", it should be
> > posible to use this for an #ifdef.
> 
> Hi Carsten,
> 
> to be more precise, its in /usr/include/sql.h, on my system. If you can give 
> me the version that is present in your library, or even better, send me a 
> short patch ;-) then i will include this in the 1.3 branch of course.
> 
> Cheers,
> 
> Henning
Index: modules/unixodbc/my_con.h
===================================================================
--- modules/unixodbc/my_con.h	(revision 4197)
+++ modules/unixodbc/my_con.h	(working copy)
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <sql.h>
 #include <sqlext.h>
+#include <sqlucode.h>
 
 
 #define STRN_LEN 1024
_______________________________________________
Devel mailing list
[email protected]
http://lists.openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to