FreeTDS apps should use sybfront and sybdb headers
Luis Lavena <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hello, I reported this to SourceForge: http://sourceforge.net/tracker/?func=detail&aid=3172166&group_id=33106&atid=407808 But seems my patch got messed up due my lack of CVS usage. So, to refresh the memory on this: * Using mingw-w64 cross-compilers (sh configure --host=i686-w64-mingw32 ...) * Using latest snapshot (freetds-0.83.dev.20110314) It explodes with the following: if i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -DUNIXODBC -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -g -O2 -Wdeclaration-after-statement -MT defncopy.o -MD -MP -MF ".deps/defncopy.Tpo" -c -o defncopy.o defncopy.c; \ then mv -f ".deps/defncopy.Tpo" ".deps/defncopy.Po"; else rm -f ".deps/defncopy.Tpo"; exit 1; fi In file included from defncopy.c:83:0: ../../include/sqlfront.h:39:30: error: conflicting type qualifiers for ‘LPCBYTE’ /Users/luis/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/winscard.h:23:23: note: previous declaration of ‘LPCBYTE’ was here The problem is triggered by line 83 of defncopy.c, which includes sqlfront.h instead of sybfront.h as mentioned before by James. The following unified diff solves the issue: $ diff -u src/apps/defncopy.c.orig src/apps/defncopy.c --- src/apps/defncopy.c.orig 2011-04-06 18:24:47.000000000 -0300 +++ src/apps/defncopy.c 2011-04-06 18:24:37.000000000 -0300 @@ -80,7 +80,7 @@ #include <locale.h> #endif -#include <sqlfront.h> +#include <sybfront.h> #include <sybdb.h> #ifndef MicrosoftsDbLib #include "replacements.h" Can someone apply this? Also, why is current so old? I saw some posts of an upcoming release candidate, but again, extremely rusty on CVS that dunno how to get the latest code. This is the final blocker into the automated build infrastructure created for TinyTDS project, which aims to provide a cross-compiled version of the library for Windows. Thank you in advance for your time. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry