Index: Makefile =================================================================== RCS file: /home/ncvs/ports/databases/freetds/Makefile,v retrieving revision 1.50 diff -u -p -r1.50 Makefile --- Makefile 16 Jun 2008 10:38:53 -0000 1.50 +++ Makefile 12 Aug 2008 22:40:37 -0000 @@ -5,8 +5,7 @@ # $FreeBSD: ports/databases/freetds/Makefile,v 1.50 2008/06/16 10:38:53 itetcu Exp $ PORTNAME= freetds -PORTVERSION= 0.64 -PORTREVISION= 2 +PORTVERSION= 0.82 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= ALPHA/${PORTNAME}/stable @@ -14,9 +13,10 @@ MASTER_SITE_SUBDIR= ALPHA/${PORTNAME}/st MAINTAINER?= ports@FreeBSD.org COMMENT= Sybase/Microsoft TDS protocol library -TDS_VER?= 5.0 +TDS_VER?= 8.0 USE_ICONV= yes +USE_OPENSSL= yes USE_GMAKE= yes GNU_GONFIGURE= yes USE_AUTOTOOLS= autoconf:261:env libtool:15 @@ -26,10 +26,17 @@ CONFIGURE_ARGS= --with-tdsver=${TDS_VER} USE_LDCONFIG= yes DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION} -MAN1= datacopy.1 freebcp.1 tsql.1 bsqldb.1 defncopy.1 +MAN1= bsqldb.1 bsqlodbc.1 datacopy.1 defncopy.1 fisql.1 freebcp.1 osql.1 tsql.1 +MAN5= freetds.conf.5 + +OPTIONS= OPENSSL "OpenSSL support" Off \ + IODBC "IODBC support" Off \ + UNIXODBC "UnixODBC support" Off \ + MSDBLIB "msdblib style support (conflicts with sybtcl)" Off + +.include .if defined(WITH_OPENSSL) -USE_OPENSSL= yes CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} .endif @@ -78,4 +85,4 @@ post-install: @${ECHO_CMD} "Sample configuration files have been installed in ${PREFIX}/etc" @${ECHO_CMD} "You should edit them and remove the .dist-suffix from their names" -.include +.include Index: distinfo =================================================================== RCS file: /home/ncvs/ports/databases/freetds/distinfo,v retrieving revision 1.15 diff -u -p -r1.15 distinfo --- distinfo 3 Mar 2007 14:18:19 -0000 1.15 +++ distinfo 12 Aug 2008 22:43:59 -0000 @@ -1,3 +1,3 @@ -MD5 (freetds-0.64.tar.gz) = ecfee5d6c96932172a1f29fb215c9d23 -SHA256 (freetds-0.64.tar.gz) = 27eeef4049590f459189f859fa73dae27604ea0bf4f197e304f9934c39312c3b -SIZE (freetds-0.64.tar.gz) = 1414954 +MD5 (freetds-0.82.tar.gz) = 3df6b2e83fd420e90f1becbd1162990a +SHA256 (freetds-0.82.tar.gz) = e2731483614bd992c8cb133bcc38432de13cfa243cc1327f37412db50c99b2b6 +SIZE (freetds-0.82.tar.gz) = 1596755 Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/databases/freetds/pkg-plist,v retrieving revision 1.18 diff -u -p -r1.18 pkg-plist --- pkg-plist 3 Mar 2007 14:18:19 -0000 1.18 +++ pkg-plist 12 Aug 2008 22:12:03 -0000 @@ -1,9 +1,11 @@ +bin/bsqldb bin/datacopy +bin/defncopy +bin/fisql bin/freebcp +bin/osql bin/tdspool bin/tsql -bin/bsqldb -bin/defncopy etc/freetds.conf.dist etc/freetds/interfaces.dist etc/locales.conf.dist @@ -17,11 +19,7 @@ include/sqlfront.h include/sybdb.h include/syberror.h include/sybfront.h -include/tds.h include/tds_sysdep_public.h -include/tdsconvert.h -include/tdssrv.h -include/tdsver.h lib/libct.a lib/libct.la lib/libct.so @@ -30,148 +28,53 @@ lib/libsybdb.a lib/libsybdb.la lib/libsybdb.so lib/libsybdb.so.5 -lib/libtds.a -lib/libtds.la -lib/libtds.so -lib/libtds.so.5 -lib/libtdssrv.a -lib/libtdssrv.la -lib/libtdssrv.so -lib/libtdssrv.so.2 %%ODBC%%lib/libtdsodbc.so %%ODBC%%lib/libtdsodbc.so.0 -@comment %%ODBC%%lib/libtdsodbc.a -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-11.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/index.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/about.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/what.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/tdshistory.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/freetdshistory.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/projects.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/build.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/packages.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/config.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/osissues.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/install.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/choosingtdsprotocol.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/freetdsconf.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/locales.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/envvar.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/configurations.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/confirminstall.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/prepodbc.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcconnattr.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/php.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/dsnless.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcinionly.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcombo.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcdiagnose.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/configs.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/nonwestern.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/domains.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/appendmode.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/tdspool.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/stunnel.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/software.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/perl.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/sybsql.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/python.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/troubleshooting.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/serverthere.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/logging.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/pagenodata.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/seemtooslow.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/help.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/mailinglist.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/askingforhelp.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/contrib.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/advocacy.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/programming.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/apireference.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/dblib.api.summary.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/ctlib.api.summary.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/odbc.api.summary.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/samplecode.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/acknowledgments.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/contributors.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacesfile.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/interfaceslocation.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacespurpose.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacesformat.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/aboutunicode.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/iso8859.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/unicode.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodegoodbad.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodeutf.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodefreetds.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-1.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-2.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-3.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-4.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-5.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-6.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-7.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-8.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-9.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-10.htm -%%PORTDOCS%%%%DOCSDIR%%/userguide/index.html -%%PORTDOCS%%%%DOCSDIR%%/userguide/userguide.css -%%PORTDOCS%%%%DOCSDIR%%/reference/todo.html -%%PORTDOCS%%%%DOCSDIR%%/reference/annotated.html -%%PORTDOCS%%%%DOCSDIR%%/reference/bug.html -%%PORTDOCS%%%%DOCSDIR%%/reference/doxygen.css -%%PORTDOCS%%%%DOCSDIR%%/reference/doxygen.png -%%PORTDOCS%%%%DOCSDIR%%/reference/files.html -%%PORTDOCS%%%%DOCSDIR%%/reference/functions.html -%%PORTDOCS%%%%DOCSDIR%%/reference/globals.html -%%PORTDOCS%%%%DOCSDIR%%/reference/index.html -%%PORTDOCS%%%%DOCSDIR%%/reference/modules.html -%%PORTDOCS%%%%DOCSDIR%%/reference/pages.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00069.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00080.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00086.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00087.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00088.html +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/1.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/10.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/2.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/3.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/4.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/5.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/6.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/7.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/8.gif +%%PORTDOCS%%%%DOCSDIR%%/images/callouts/9.gif +%%PORTDOCS%%%%DOCSDIR%%/images/caution.gif +%%PORTDOCS%%%%DOCSDIR%%/images/important.gif +%%PORTDOCS%%%%DOCSDIR%%/images/note.gif +%%PORTDOCS%%%%DOCSDIR%%/images/tip.gif +%%PORTDOCS%%%%DOCSDIR%%/images/warning.gif +%%PORTDOCS%%%%DOCSDIR%%/reference/a00009.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00010.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00079.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00090.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00092.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00121.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00122.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00123.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00124.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00125.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00126.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00127.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00096.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00097.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00098.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00100.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00102.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00106.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00107.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00108.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00112.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00133.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00134.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00135.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00136.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00137.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00138.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00139.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00140.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00141.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00142.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00143.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00144.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00147.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00170.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00172.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00248.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00249.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00250.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00251.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00252.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00253.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00254.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00255.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00256.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00257.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00258.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00259.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00260.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00261.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00262.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00263.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00264.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00265.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00266.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00267.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00268.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00269.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00270.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00271.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00272.html -%%PORTDOCS%%%%DOCSDIR%%/reference/a00273.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00145.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00160.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00163.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00193.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00195.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00274.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00275.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00276.html @@ -212,6 +115,33 @@ lib/libtdssrv.so.2 %%PORTDOCS%%%%DOCSDIR%%/reference/a00311.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00312.html %%PORTDOCS%%%%DOCSDIR%%/reference/a00313.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00314.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00315.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00316.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00317.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00318.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00319.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00320.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00321.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00322.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00323.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00324.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00325.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00326.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00327.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00328.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00329.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00330.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00331.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00332.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00333.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00334.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00335.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00336.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00337.html +%%PORTDOCS%%%%DOCSDIR%%/reference/a00338.html +%%PORTDOCS%%%%DOCSDIR%%/reference/annotated.html +%%PORTDOCS%%%%DOCSDIR%%/reference/bug.html %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000000.html %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000001.html %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000002.html @@ -227,18 +157,104 @@ lib/libtdssrv.so.2 %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000012.html %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000013.html %%PORTDOCS%%%%DOCSDIR%%/reference/dir_000014.html +%%PORTDOCS%%%%DOCSDIR%%/reference/dir_000015.html %%PORTDOCS%%%%DOCSDIR%%/reference/dirs.html +%%PORTDOCS%%%%DOCSDIR%%/reference/doxygen.css +%%PORTDOCS%%%%DOCSDIR%%/reference/doxygen.png +%%PORTDOCS%%%%DOCSDIR%%/reference/files.html +%%PORTDOCS%%%%DOCSDIR%%/reference/functions.html %%PORTDOCS%%%%DOCSDIR%%/reference/functions_vars.html +%%PORTDOCS%%%%DOCSDIR%%/reference/globals.html %%PORTDOCS%%%%DOCSDIR%%/reference/globals_defs.html %%PORTDOCS%%%%DOCSDIR%%/reference/globals_enum.html +%%PORTDOCS%%%%DOCSDIR%%/reference/globals_eval.html %%PORTDOCS%%%%DOCSDIR%%/reference/globals_func.html %%PORTDOCS%%%%DOCSDIR%%/reference/globals_type.html %%PORTDOCS%%%%DOCSDIR%%/reference/globals_vars.html -%%PORTDOCS%%%%DOCSDIR%%/images/important.gif -%%PORTDOCS%%%%DOCSDIR%%/images/note.gif -%%PORTDOCS%%%%DOCSDIR%%/images/tip.gif +%%PORTDOCS%%%%DOCSDIR%%/reference/index.html +%%PORTDOCS%%%%DOCSDIR%%/reference/modules.html +%%PORTDOCS%%%%DOCSDIR%%/reference/pages.html +%%PORTDOCS%%%%DOCSDIR%%/reference/todo.html +%%PORTDOCS%%%%DOCSDIR%%/userguide/about.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/aboutunicode.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/acknowledgments.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/advocacy.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/apireference.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/appendmode.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/askingforhelp.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/build.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/choosingtdsprotocol.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/config.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/configs.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/confirminstall.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/contrib.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/contributors.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/ctlib.api.summary.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/dblib.api.summary.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/domains.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/dsnless.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/envvar.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/freetdsconf.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/freetdshistory.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-1.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-10.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-11.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-2.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-3.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-4.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-5.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-6.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-7.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-8.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl-9.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/gfdl.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/help.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/index.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/index.html +%%PORTDOCS%%%%DOCSDIR%%/userguide/install.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacesfile.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacesformat.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/interfaceslocation.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/interfacespurpose.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/iso8859.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/locales.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/localization.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/logging.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/mailinglist.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/odbc.api.summary.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcconnattr.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcdiagnose.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcinionly.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/odbcombo.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/osissues.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/packages.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/pagenodata.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/perl.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/php.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/portoverride.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/prepodbc.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/programming.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/projects.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/python.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/samplecode.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/seemtooslow.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/serverthere.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/software.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/stunnel.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/sybsql.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/tdshistory.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/tdspool.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/troubleshooting.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/unicode.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodefreetds.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodegoodbad.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/unicodeutf.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/usefreetds.htm +%%PORTDOCS%%%%DOCSDIR%%/userguide/userguide.css +%%PORTDOCS%%%%DOCSDIR%%/userguide/what.htm %%PORTDOCS%%@dirrm %%DOCSDIR%%/userguide %%PORTDOCS%%@dirrm %%DOCSDIR%%/reference +%%PORTDOCS%%@dirrm %%DOCSDIR%%/images/callouts %%PORTDOCS%%@dirrm %%DOCSDIR%%/images %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm etc/freetds Index: files/patch-dev20080707 =================================================================== RCS file: files/patch-dev20080707 diff -N files/patch-dev20080707 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-dev20080707 12 Aug 2008 22:44:54 -0000 @@ -0,0 +1,1285 @@ +--- ./ChangeLog.orig 2008-05-07 15:57:52.000000000 -0700 ++++ ./ChangeLog 2008-08-12 15:44:15.971721471 -0700 +@@ -1,10 +1,50 @@ ++Thu Jun 26 23:10:02 EDT 2008 JK Lowden ++ * NEWS added note about tds files no longer installed. ++ ++Wed Jun 18 00:08:25 EDT 2008 JK Lowden ++ * src/odbc/odbc.c src/odbc/unittests/getdata.c ++ - Applied patch from Suren A. Chilingaryan cf. ++ - ML on 15 June 2008 ++ ++Fri Jun 06 18:41:50 CET 2008 Frediano Ziglio ++ * src/odbc/odbc.c src/odbc/unittests/cursor6.c(added): ++ - backported cursor6 test and fix ++ - SQLFetch odbc 2 compliant ++ ++Wed May 28 23:07:18 CET 2008 Frediano Ziglio ++ * src/server/server.c: fix possible NULL access ++ ++Wed May 28 22:07:18 CET 2008 Frediano Ziglio ++ * src/apps/freebcp.c src/apps/tsql.c: ++ - fix minor memory leaks ++ ++Wed May 28 09:38:24 EDT 2008 JK Lowden ++ * configure.ac src/apps/tsql.c ++ - reset getopt(3) portably ++ ++Tue May 27 18:34:24 EDT 2008 JK Lowden ++ * include/tds.h include arpa/inet.h ++ ++Mon May 26 14:47:43 CET 2008 Frediano Ziglio ++ (mostly from Coverity report) ++ * include/tds.h: fix possible buffer overflow ++ * include/tdsbytes.h: remove warning ++ * src/apps/tsql.c src/dblib/bcp.c src/dblib/dblib.c: ++ - remove some leaks ++ * src/tds/mem.c: avoid deference of null pointer ++ ++Mon May 19 10:20:17 EDT 2008 JK Lowden ++ * configure.ac set version to 0.82.1 ++ * include/cspublic.h ++ - applied ML patch today for BLK_VERSION for sqsh ++ + Wed May 7 18:56:39 EDT 2008 JK Lowden + * configure.ac RELEASE 0.82 + + Mon May 5 23:19:57 EDT 2008 JK Lowden + * include/cstypes.h src/ctlib/ct.c + - applied CS_BIGINT patch from Stephen Degler +- ++ + Wed Apr 30 09:52:39 CET 2008 Frediano Ziglio + * src/odbc/odbc.c: + - return proper diagnostic for truncation on SQLGetData +@@ -145,4 +185,4 @@ + * ChangeLog truncated because of release + * ChangeLog-0.82 added because of release + +-$Id: ChangeLog,v 1.2454.2.35 2008/05/07 22:57:52 jklowden Exp $ ++$Id: ChangeLog,v 1.2454.2.44 2008/06/27 03:11:42 jklowden Exp $ +--- ./NEWS.orig 2008-02-28 14:30:18.000000000 -0800 ++++ ./NEWS 2008-08-12 15:44:15.987726446 -0700 +@@ -1,4 +1,4 @@ +-$Id: NEWS,v 1.43.2.1 2008/01/10 20:58:43 jklowden Exp $ ++$Id: NEWS,v 1.43.2.2 2008/06/27 03:11:42 jklowden Exp $ + + Executive Summary of Changes in release 0.82 + -------------------------------------------- +@@ -10,6 +10,7 @@ + 5. 23,710 lines added or deleted (101,022 total). + 6. 85 files added + 7. 21 unit tests added ++8. libtds.so and tds.h no longer installed. + + Details + ------- +@@ -59,6 +60,24 @@ + 3 tests for dblib + 13 tests for odbc + ++libtds.so ++- tds.h not installed ++- libtds.a not installed ++- libtds.so not built (or installed) ++ ++Applications using the FreeTDS API libraries -- db-lib, ct-lib, and ODBC -- ++do not need to include tds.h nor link to libtds. The API libraries are ++statically linked to libtds, which is no long supported as a shared object. ++ ++Some packages, notably PHP, rely on the presence of these files to determine ++whether or not FreeTDS is installed. (Better choices would be sybfront.h and ++libsybdb. These latter files will always be installed because they're needed ++by db-lib applications.) To add null versions of these files, you might ++try: ++ touch tds.h ++ ar -rc libtds.so # etc. ++ ++ + libTDS API changes + - tds_add_row_column_size removed + - tds_alloc_row return now TDS_SUCCEED/TDS_FAIL +--- ./configure.orig 2008-05-07 15:59:26.000000000 -0700 ++++ ./configure 2008-08-12 15:44:16.059722572 -0700 +@@ -1,7 +1,7 @@ + #! /bin/sh +-# From configure.ac Revision: 1.29.2.11 . ++# From configure.ac Revision: 1.29.2.13 . + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for FreeTDS 0.82. ++# Generated by GNU Autoconf 2.59 for FreeTDS 0.82.dev.20080707. + # + # Copyright (C) 2003 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation +@@ -418,8 +418,8 @@ + # Identity of this package. + PACKAGE_NAME='FreeTDS' + PACKAGE_TARNAME='freetds' +-PACKAGE_VERSION='0.82' +-PACKAGE_STRING='FreeTDS 0.82' ++PACKAGE_VERSION='0.82.dev.20080707' ++PACKAGE_STRING='FreeTDS 0.82.dev.20080707' + PACKAGE_BUGREPORT='' + + ac_unique_file="src/dblib/dblib.c" +@@ -930,7 +930,7 @@ + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures FreeTDS 0.82 to adapt to many kinds of systems. ++\`configure' configures FreeTDS 0.82.dev.20080707 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -996,7 +996,7 @@ + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of FreeTDS 0.82:";; ++ short | recursive ) echo "Configuration of FreeTDS 0.82.dev.20080707:";; + esac + cat <<\_ACEOF + +@@ -1157,7 +1157,7 @@ + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF +-FreeTDS configure 0.82 ++FreeTDS configure 0.82.dev.20080707 + generated by GNU Autoconf 2.59 + + Copyright (C) 2003 Free Software Foundation, Inc. +@@ -1171,7 +1171,7 @@ + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by FreeTDS $as_me 0.82, which was ++It was created by FreeTDS $as_me 0.82.dev.20080707, which was + generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ +@@ -1818,7 +1818,7 @@ + + # Define the identity of the package. + PACKAGE='freetds' +- VERSION='0.82' ++ VERSION='0.82.dev.20080707' + + + cat >>confdefs.h <<_ACEOF +@@ -13973,9 +13973,10 @@ + + + ++ + for ac_header in unistd.h errno.h wchar.h sys/time.h sys/types.h \ + sys/param.h sys/stat.h sys/wait.h limits.h locale.h odbcss.h readpassphrase.h \ +-signal.h libgen.h poll.h ++signal.h libgen.h poll.h getopt.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then +@@ -19398,6 +19399,66 @@ + + + ++echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5 ++echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6 ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#ifdef HAVE_GETOPT_H ++#include ++#endif ++int ++main () ++{ ++extern int optreset; optreset = 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_GETOPT_OPTRESET 1 ++_ACEOF ++ ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++ + # ------------------------------------------------------------ + # Checks for compiler characteristics. + # ------------------------------------------------------------ +@@ -24449,7 +24510,7 @@ + } >&5 + cat >&5 <<_CSEOF + +-This file was extended by FreeTDS $as_me 0.82, which was ++This file was extended by FreeTDS $as_me 0.82.dev.20080707, which was + generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -24512,7 +24573,7 @@ + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ +-FreeTDS config.status 0.82 ++FreeTDS config.status 0.82.dev.20080707 + configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +--- ./configure.ac.orig 2008-05-07 15:57:52.000000000 -0700 ++++ ./configure.ac 2008-08-12 15:44:16.071737058 -0700 +@@ -1,7 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. + + dnl ------------------------------------------------------------ +-dnl $Id: configure.ac,v 1.29.2.11 2008/05/07 22:57:52 jklowden Exp $ ++dnl $Id: configure.ac,v 1.29.2.13 2008/05/28 13:40:28 jklowden Exp $ + dnl If you're trying to create a new configure test, try + dnl + dnl http://autogen.sourceforge.net/conftest.html +@@ -12,10 +12,10 @@ + # ------------------------------------------------------------ + # Initialization + # ------------------------------------------------------------ +-AC_INIT(FreeTDS, 0.82) ++AC_INIT(FreeTDS, 0.82.dev.esyscmd(echo -n $(date +"%Y%m%d"))) + AC_CONFIG_SRCDIR(src/dblib/dblib.c) + AC_PREREQ(2.53) +-AC_REVISION($Revision: 1.29.2.11 $) ++AC_REVISION($Revision: 1.29.2.13 $) + + AM_INIT_AUTOMAKE + AC_CONFIG_HEADERS(include/config.h) +@@ -240,7 +240,7 @@ + ]) + AC_CHECK_HEADERS([unistd.h errno.h wchar.h sys/time.h sys/types.h \ + sys/param.h sys/stat.h sys/wait.h limits.h locale.h odbcss.h readpassphrase.h \ +-signal.h libgen.h poll.h]) ++signal.h libgen.h poll.h getopt.h]) + if test $tds_mingw = no; then + AC_CHECK_HEADERS([sys/socket.h arpa/inet.h netdb.h netinet/in.h \ + netinet/tcp.h paths.h sys/ioctl.h langinfo.h]) +@@ -347,6 +347,16 @@ + + TYPE_SOCKLEN_T + ++AC_MSG_CHECKING([whether getopt has optreset support]) ++AC_TRY_LINK([#ifdef HAVE_GETOPT_H ++#include ++#endif], [extern int optreset; optreset = 0;], ++[AC_MSG_RESULT(yes) ++AC_DEFINE(HAVE_GETOPT_OPTRESET, 1, [Define if your getopt(3) defines and uses optreset])], ++[AC_MSG_RESULT(no)] ++) ++ ++ + # ------------------------------------------------------------ + # Checks for compiler characteristics. + # ------------------------------------------------------------ +--- ./doc/bsqldb.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/bsqldb.1 2008-08-12 15:44:16.074739981 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBbsqldb \fP- batch SQL script processor using db-lib + \fB +--- ./doc/bsqlodbc.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/bsqlodbc.1 2008-08-12 15:44:16.076718743 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBbsqlodbc \fP- batch SQL script processor using ODBC + \fB +--- ./doc/datacopy.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/datacopy.1 2008-08-12 15:44:16.078729911 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBdatacopy \fP- move table data between two servers + .SH SYNOPSIS +--- ./doc/defncopy.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/defncopy.1 2008-08-12 15:44:16.365722658 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBdefncopy \fP- extract procedures and views from a Microsoft server. + \fB +--- ./doc/fisql.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/fisql.1 2008-08-12 15:44:16.366721956 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBfisql \fP- interactive SQL shell + \fB +--- ./doc/freebcp.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/freebcp.1 2008-08-12 15:44:16.368726699 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBfreebcp \fP- bulk loading utility for Sybase and Microsoft databases + .SH SYNOPSIS +--- ./doc/osql.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/osql.1 2008-08-12 15:44:16.369727394 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBosql \fP- utility to test FreeTDS connections and queries + \fB +--- ./doc/tsql.1.orig 2008-02-28 14:37:40.000000000 -0800 ++++ ./doc/tsql.1 2008-08-12 15:44:16.499724163 -0700 +@@ -1,5 +1,5 @@ + ." Text automatically generated by txt2man-1.4.7 +-.TH FreeTDS "February 28, 2008" "0.82RC2" "FreeTDS Utilities" ++.TH FreeTDS "July 07, 2008" "0.82.dev.20080707" "FreeTDS Utilities" + .SH NAME + \fBtsql \fP- utility to test FreeTDS connections and queries + .SH SYNOPSIS +--- ./freetds.spec.orig 2008-05-07 16:21:06.000000000 -0700 ++++ ./freetds.spec 2008-08-12 15:44:16.500722902 -0700 +@@ -1,5 +1,5 @@ + %define name freetds +-%define version 0.82 ++%define version 0.82.dev.20080707 + + # compute some additional dependency from vendor name + # +--- ./include/config.h.in.orig 2008-05-07 16:00:10.000000000 -0700 ++++ ./include/config.h.in 2008-08-12 15:44:16.501734213 -0700 +@@ -117,6 +117,12 @@ + /* Define to 1 if you have the `getnameinfo' function. */ + #undef HAVE_GETNAMEINFO + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_GETOPT_H ++ ++/* Define if your getopt(3) defines and uses optreset */ ++#undef HAVE_GETOPT_OPTRESET ++ + /* Define to 1 if you have the `getpwuid' function. */ + #undef HAVE_GETPWUID + +--- ./include/cspublic.h.orig 2007-06-25 02:48:20.000000000 -0700 ++++ ./include/cspublic.h 2008-08-12 15:44:16.503724987 -0700 +@@ -34,7 +34,7 @@ + #define TDS_STATIC_CAST(type, a) ((type)(a)) + #endif + +-static const char rcsid_cspublic_h[] = "$Id: cspublic.h,v 1.58 2007/06/25 09:48:20 freddy77 Exp $"; ++static const char rcsid_cspublic_h[] = "$Id: cspublic.h,v 1.58.2.1 2008/05/19 14:23:52 jklowden Exp $"; + static const void *const no_unused_cspublic_h_warn[] = { rcsid_cspublic_h, no_unused_cspublic_h_warn }; + + #define CS_PUBLIC +@@ -447,6 +447,9 @@ + + #define BLK_VERSION_100 CS_VERSION_100 + #define BLK_VERSION_110 CS_VERSION_100 ++#define BLK_VERSION_120 CS_VERSION_120 ++#define BLK_VERSION_125 CS_VERSION_125 ++#define BLK_VERSION_150 CS_VERSION_150 + + #define CS_FORCE_EXIT 300 + #define CS_FORCE_CLOSE 301 +--- ./include/tds.h.orig 2007-12-27 05:45:22.000000000 -0800 ++++ ./include/tds.h 2008-08-12 15:44:16.506723161 -0700 +@@ -20,12 +20,16 @@ + #ifndef _tds_h_ + #define _tds_h_ + +-/* $Id: tds.h,v 1.284 2007/12/27 13:45:22 freddy77 Exp $ */ ++/* $Id: tds.h,v 1.284.2.2 2008/05/27 22:48:50 jklowden Exp $ */ + + #include + #include + #include + ++#if HAVE_ARPA_INET_H ++#include ++#endif /* HAVE_ARPA_INET_H */ ++ + /* forward declaration */ + typedef struct tdsiconvinfo TDSICONV; + typedef struct tds_socket TDSSOCKET; +@@ -747,7 +751,7 @@ + + + #define TDS_MAX_CAPABILITY 22 +-#define MAXPRECISION 80 ++#define MAXPRECISION 77 + #define TDS_MAX_CONN 4096 + #define TDS_MAX_DYNID_LEN 30 + +--- ./include/tdsbytes.h.orig 2005-08-10 05:06:03.000000000 -0700 ++++ ./include/tdsbytes.h 2008-08-12 15:44:16.665738689 -0700 +@@ -20,7 +20,7 @@ + #ifndef _tdsbytes_h_ + #define _tdsbytes_h_ + +-/* $Id: tdsbytes.h,v 1.2 2005/08/10 12:06:03 freddy77 Exp $ */ ++/* $Id: tdsbytes.h,v 1.2.4.1 2008/05/26 12:49:56 freddy77 Exp $ */ + + #ifndef _tds_h_ + #error tds.h must be included before tdsbytes.h +@@ -61,9 +61,9 @@ + #define TDS_GET_A2BE(ptr) TDS_GET_UA2BE(ptr) + + #define TDS_PUT_UA2LE(ptr,val) do {\ +- ((TDS_UCHAR*)(ptr))[1] = (val)>>8; ((TDS_UCHAR*)(ptr))[0] = (val); } while(0) ++ ((TDS_UCHAR*)(ptr))[1] = (TDS_UCHAR)((val)>>8); ((TDS_UCHAR*)(ptr))[0] = (TDS_UCHAR)(val); } while(0) + #define TDS_PUT_UA2BE(ptr,val) do {\ +- ((TDS_UCHAR*)(ptr))[0] = (val)>>8; ((TDS_UCHAR*)(ptr))[1] = (val); } while(0) ++ ((TDS_UCHAR*)(ptr))[0] = (TDS_UCHAR)((val)>>8); ((TDS_UCHAR*)(ptr))[1] = (TDS_UCHAR)(val); } while(0) + #define TDS_PUT_A2LE(ptr,val) TDS_PUT_UA2LE(ptr,val) + #define TDS_PUT_A2BE(ptr,val) TDS_PUT_UA2BE(ptr,val) + +@@ -78,11 +78,11 @@ + #define TDS_GET_A4BE(ptr) TDS_GET_UA4BE(ptr) + + #define TDS_PUT_UA4LE(ptr,val) do {\ +- ((TDS_UCHAR*)(ptr))[3] = (val)>>24; ((TDS_UCHAR*)(ptr))[2] = (val)>>16;\ +- ((TDS_UCHAR*)(ptr))[1] = (val)>>8; ((TDS_UCHAR*)(ptr))[0] = (val); } while(0) ++ ((TDS_UCHAR*)(ptr))[3] = (TDS_UCHAR)((val)>>24); ((TDS_UCHAR*)(ptr))[2] = (TDS_UCHAR)((val)>>16);\ ++ ((TDS_UCHAR*)(ptr))[1] = (TDS_UCHAR)((val)>>8); ((TDS_UCHAR*)(ptr))[0] = (TDS_UCHAR)(val); } while(0) + #define TDS_PUT_UA4BE(ptr,val) do {\ +- ((TDS_UCHAR*)(ptr))[0] = (val)>>24; ((TDS_UCHAR*)(ptr))[1] = (val)>>16;\ +- ((TDS_UCHAR*)(ptr))[2] = (val)>>8; ((TDS_UCHAR*)(ptr))[3] = (val); } while(0) ++ ((TDS_UCHAR*)(ptr))[0] = (TDS_UCHAR)((val)>>24); ((TDS_UCHAR*)(ptr))[1] = (TDS_UCHAR)((val)>>16);\ ++ ((TDS_UCHAR*)(ptr))[2] = (TDS_UCHAR)((val)>>8); ((TDS_UCHAR*)(ptr))[3] = (TDS_UCHAR)(val); } while(0) + #define TDS_PUT_A4LE(ptr,val) TDS_PUT_UA4LE(ptr,val) + #define TDS_PUT_A4BE(ptr,val) TDS_PUT_UA4BE(ptr,val) + +--- ./include/tdsver.h.orig 2008-05-07 16:21:05.000000000 -0700 ++++ ./include/tdsver.h 2008-08-12 15:44:16.666729048 -0700 +@@ -22,6 +22,6 @@ + + /* $Id: tdsver.h.in,v 1.6 2006/04/12 13:54:10 freddy77 Exp $ */ + +-#define TDS_VERSION_NO "freetds v0.82" ++#define TDS_VERSION_NO "freetds v0.82.dev.20080707" + + #endif +--- ./src/apps/freebcp.c.orig 2006-12-01 13:51:11.000000000 -0800 ++++ ./src/apps/freebcp.c 2008-08-12 15:44:16.668724571 -0700 +@@ -45,7 +45,7 @@ + #include + #include "freebcp.h" + +-static char software_version[] = "$Id: freebcp.c,v 1.48 2006/12/01 21:51:11 jklowden Exp $"; ++static char software_version[] = "$Id: freebcp.c,v 1.48.2.1 2008/05/28 20:07:55 freddy77 Exp $"; + static void *no_unused_var_warn[] = { software_version, no_unused_var_warn }; + + void pusage(void); +@@ -351,6 +351,8 @@ + */ + + login = dblogin(); ++ if (!login) ++ return FALSE; + + DBSETLUSER(login, pdata->user); + DBSETLPWD(login, pdata->pass); +@@ -372,8 +374,11 @@ + + if ((*pdbproc = dbopen(login, pdata->server)) == NULL) { + fprintf(stderr, "Can't connect to server \"%s\".\n", pdata->server); ++ dbloginfree(login); + return (FALSE); + } ++ dbloginfree(login); ++ login = NULL; + + /* set hint if any */ + if (pdata->hint) { +--- ./src/apps/tsql.c.orig 2008-01-11 04:46:52.000000000 -0800 ++++ ./src/apps/tsql.c 2008-08-12 15:44:16.797737965 -0700 +@@ -85,7 +85,9 @@ + #include "tdsconvert.h" + #include "replacements.h" + +-TDS_RCSID(var, "$Id: tsql.c,v 1.112.2.1 2008/01/11 12:46:52 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: tsql.c,v 1.112.2.5 2008/05/31 08:53:39 freddy77 Exp $"); ++ ++#define TDS_ISSPACE(c) isspace((unsigned char) (c)) + + enum + { +@@ -301,6 +303,15 @@ + progname, progname); + } + ++static void ++reset_getopt(void) ++{ ++#ifdef HAVE_GETOPT_OPTRESET ++ optreset = 1; ++#endif ++ optind = 1; ++} ++ + /* + * The 'GO' command may be followed by options that apply to the batch. + * If they don't appear to be right, assume the letters "go" are part of the +@@ -324,7 +335,7 @@ + s = NULL; + + *opt_flags = 0; +- optind = 0; /* reset getopt */ ++ reset_getopt(); + opterr = 0; /* suppress error messages */ + while ((opt = getopt(argc, argv, "fhqtv")) != -1) { + switch (opt) { +@@ -396,24 +407,24 @@ + opt_flags_str = optarg; + break; + case 'H': +- hostname = (char *) malloc(strlen(optarg) + 1); +- strcpy(hostname, optarg); ++ free(hostname); ++ hostname = strdup(optarg); + break; + case 'S': +- servername = (char *) malloc(strlen(optarg) + 1); +- strcpy(servername, optarg); ++ free(servername); ++ servername = strdup(optarg); + break; + case 'U': +- username = (char *) malloc(strlen(optarg) + 1); +- strcpy(username, optarg); ++ free(username); ++ username = strdup(optarg); + break; + case 'P': +- password = (char *) malloc(strlen(optarg) + 1); +- strcpy(password, optarg); ++ free(password); ++ password = strdup(optarg); + break; + case 'I': +- confile = (char *) malloc(strlen(optarg) + 1); +- strcpy(confile, optarg); ++ free(confile); ++ confile = strdup(optarg); + break; + case 'p': + port = atoi(optarg); +@@ -524,6 +535,7 @@ + } + + /* free up all the memory */ ++ free(confile); + free(hostname); + free(username); + free(password); +@@ -572,6 +584,7 @@ + tsql_add_history(s); + (*line)++; + } ++ fclose(fp); + } + + extern const char STD_DATETIME_FMT[]; +@@ -709,7 +722,7 @@ + * The rest of the line may include options that apply to the batch, + * and perhaps whitespace. + */ +- if (0 == strncasecmp(s, "go", 2) && (strlen(s) == 2 || isspace(s[2]))) { ++ if (0 == strncasecmp(s, "go", 2) && (strlen(s) == 2 || TDS_ISSPACE(s[2]))) { + char *go_line = strdup(s); + assert(go_line); + line = 0; +--- ./src/dblib/bcp.c.orig 2008-01-08 07:38:31.000000000 -0800 ++++ ./src/dblib/bcp.c 2008-08-12 15:44:16.805726205 -0700 +@@ -71,7 +71,7 @@ + } + TDS_PBCB; + +-TDS_RCSID(var, "$Id: bcp.c,v 1.171 2008/01/08 15:38:31 jklowden Exp $"); ++TDS_RCSID(var, "$Id: bcp.c,v 1.171.2.1 2008/05/26 12:49:56 freddy77 Exp $"); + + #ifdef HAVE_FSEEKO + typedef off_t offset_type; +@@ -799,11 +799,13 @@ + + if (dbproc->bcpinfo->direction == DB_QUERYOUT ) { + if (tds_submit_query(tds, dbproc->bcpinfo->tablename) == TDS_FAIL) { ++ fclose(hostfile); + return FAIL; + } + } else { + /* TODO quote if needed */ + if (tds_submit_queryf(tds, "select * from %s", dbproc->bcpinfo->tablename) == TDS_FAIL) { ++ fclose(hostfile); + return FAIL; + } + } +@@ -1061,6 +1063,7 @@ + break; + } + if( plen != 0 && written != 1 ) { ++ fclose(hostfile); + dbperror(dbproc, SYBEBCWE, errno); + return FAIL; + } +@@ -1073,6 +1076,7 @@ + if (buflen > 0) { + written = fwrite(hostcol->bcp_column_data->data, buflen, 1, hostfile); + if (written < 1) { ++ fclose(hostfile); + dbperror(dbproc, SYBEBCWE, errno); + return FAIL; + } +@@ -1082,6 +1086,7 @@ + if (hostcol->terminator && hostcol->term_len > 0) { + written = fwrite(hostcol->terminator, hostcol->term_len, 1, hostfile); + if (written < 1) { ++ fclose(hostfile); + dbperror(dbproc, SYBEBCWE, errno); + return FAIL; + } +@@ -1094,6 +1099,7 @@ + dbperror(dbproc, SYBEBCUC, errno); + return (FAIL); + } ++ hostfile = NULL; + + if (dbproc->hostfileinfo->firstrow > 0 && row_of_query < dbproc->hostfileinfo->firstrow) { + /* +@@ -1896,8 +1902,10 @@ + return FAIL; + } + +- if (_bcp_start_copy_in(dbproc) == FAIL) ++ if (_bcp_start_copy_in(dbproc) == FAIL) { ++ fclose(hostfile); + return FAIL; ++ } + + tds->out_flag = TDS_BULK; + tds_set_state(tds, TDS_QUERYING); +@@ -1922,6 +1930,7 @@ + + if (errfile == NULL && dbproc->hostfileinfo->errorfile) { + if (!(errfile = fopen(dbproc->hostfileinfo->errorfile, "w"))) { ++ fclose(hostfile); + dbperror(dbproc, SYBEBUOE, 0); + return FAIL; + } +@@ -2003,6 +2012,7 @@ + if (tds_process_simple_query(tds) != TDS_SUCCEED) { + if (errfile) + fclose(errfile); ++ fclose(hostfile); + return FAIL; + } + +--- ./src/dblib/dblib.c.orig 2008-01-01 15:09:46.000000000 -0800 ++++ ./src/dblib/dblib.c 2008-08-12 15:44:16.819725320 -0700 +@@ -76,7 +76,7 @@ + #include + #endif + +-TDS_RCSID(var, "$Id: dblib.c,v 1.320 2008/01/01 23:09:46 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: dblib.c,v 1.320.2.1 2008/05/26 12:49:56 freddy77 Exp $"); + + static RETCODE _dbresults(DBPROCESS * dbproc); + static int _db_get_server_type(int bindtype); +@@ -3325,8 +3325,10 @@ + computeid = status; + + for (i = 0;; ++i) { +- if (i >= tds->num_comp_info) ++ if (i >= tds->num_comp_info) { ++ free(col_printlens); + return FAIL; ++ } + resinfo = tds->comp_info[i]; + if (resinfo->computeid == computeid) + break; +--- ./src/odbc/odbc.c.orig 2008-05-05 19:57:26.000000000 -0700 ++++ ./src/odbc/odbc.c 2008-08-12 15:44:16.832729327 -0700 +@@ -60,7 +60,7 @@ + #include + #endif + +-TDS_RCSID(var, "$Id: odbc.c,v 1.464.2.10 2008/04/30 14:59:32 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: odbc.c,v 1.464.2.12 2008/06/18 04:11:39 jklowden Exp $"); + + static SQLRETURN _SQLAllocConnect(SQLHENV henv, SQLHDBC FAR * phdbc); + static SQLRETURN _SQLAllocEnv(SQLHENV FAR * phenv); +@@ -3608,10 +3608,6 @@ + truncated = 1; + stmt->errs.lastrc = SQL_SUCCESS_WITH_INFO; + } +- } else { +- /* TODO change when we code cursors support... */ +- /* stop looping, forward cursor support only one row */ +- num_rows = 1; + } + if (drec_ard->sql_desc_octet_length_ptr) + *AT_ROW(drec_ard->sql_desc_octet_length_ptr, SQLLEN) = len; +@@ -3648,11 +3644,33 @@ + SQLRETURN ODBC_API + SQLFetch(SQLHSTMT hstmt) + { ++ SQLRETURN ret; ++ SQLULEN save_sql_desc_array_size; ++ SQLULEN *save_sql_desc_rows_processed_ptr; ++ SQLUSMALLINT *save_sql_desc_array_status_ptr; ++ + INIT_HSTMT; + + tdsdump_log(TDS_DBG_FUNC, "SQLFetch(%p)\n", hstmt); + +- ODBC_RETURN(stmt, _SQLFetch(stmt, SQL_FETCH_NEXT, 0)); ++ if (stmt->dbc->env->attr.odbc_version != SQL_OV_ODBC3) { ++ save_sql_desc_array_size = stmt->ard->header.sql_desc_array_size; ++ stmt->ard->header.sql_desc_array_size = 1; ++ save_sql_desc_rows_processed_ptr = stmt->ird->header.sql_desc_rows_processed_ptr; ++ stmt->ird->header.sql_desc_rows_processed_ptr = NULL; ++ save_sql_desc_array_status_ptr = stmt->ird->header.sql_desc_array_status_ptr; ++ stmt->ird->header.sql_desc_array_status_ptr = NULL; ++ } ++ ++ ret = _SQLFetch(stmt, SQL_FETCH_NEXT, 0); ++ ++ if (stmt->dbc->env->attr.odbc_version != SQL_OV_ODBC3) { ++ stmt->ard->header.sql_desc_array_size = save_sql_desc_array_size; ++ stmt->ird->header.sql_desc_rows_processed_ptr = save_sql_desc_rows_processed_ptr; ++ stmt->ird->header.sql_desc_array_status_ptr = save_sql_desc_array_status_ptr; ++ } ++ ++ ODBC_RETURN(stmt, ret); + } + + #if (ODBCVER >= 0x0300) +@@ -4564,6 +4582,8 @@ + SQLLEN dummy_cb; + int nSybType; + ++ int extra_bytes = 0; ++ + INIT_HSTMT; + + tdsdump_log(TDS_DBG_FUNC, "SQLGetData(%p, %u, %d, %p, %d, %p)\n", +@@ -4601,42 +4621,140 @@ + if (colinfo->column_cur_size < 0) { + *pcbValue = SQL_NULL_DATA; + } else { ++ nSybType = tds_get_conversion_type(colinfo->column_type, colinfo->column_size); ++ if (fCType == SQL_C_DEFAULT) ++ fCType = odbc_sql_to_c_type_default(stmt->ird->records[icol - 1].sql_desc_concise_type); ++ if (fCType == SQL_ARD_TYPE) { ++ if (icol > stmt->ard->header.sql_desc_count) { ++ odbc_errs_add(&stmt->errs, "07009", NULL); ++ ODBC_RETURN(stmt, SQL_ERROR); ++ } ++ fCType = stmt->ard->records[icol - 1].sql_desc_concise_type; ++ } ++ assert(fCType); ++ + src = (TDS_CHAR *) colinfo->column_data; + if (is_variable_type(colinfo->column_type)) { +- if (colinfo->column_text_sqlgetdatapos > 0 +- && colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) +- ODBC_RETURN(stmt, SQL_NO_DATA); +- ++ int nread = 0; ++ + /* 2003-8-29 check for an old bug -- freddy77 */ + assert(colinfo->column_text_sqlgetdatapos >= 0); + if (is_blob_type(colinfo->column_type)) + src = ((TDSBLOB *) src)->textvalue; +- src += colinfo->column_text_sqlgetdatapos; +- srclen = colinfo->column_cur_size - colinfo->column_text_sqlgetdatapos; ++ ++ if (fCType == SQL_C_CHAR && colinfo->column_text_sqlgetdatapos) { ++ TDS_CHAR buf[3]; ++ SQLLEN len; ++ ++ switch (nSybType) { ++ case SYBLONGBINARY: ++ case SYBBINARY: ++ case SYBVARBINARY: ++ case SYBIMAGE: ++ case XSYBBINARY: ++ case XSYBVARBINARY: ++ case TDS_CONVERT_BINARY: ++ if (colinfo->column_text_sqlgetdatapos % 2) { ++ nread = (colinfo->column_text_sqlgetdatapos - 1) / 2; ++ if (nread >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ ++ if (cbValueMax > 2) { ++ len = convert_tds2sql(context, nSybType, src + nread, 1, fCType, buf, sizeof(buf), NULL); ++ if (len < 2) { ++ if (len < 0) ++ odbc_convert_err_set(&stmt->errs, len); ++ ODBC_RETURN(stmt, SQL_ERROR); ++ } ++ *(TDS_CHAR *) rgbValue = buf[1]; ++ *((TDS_CHAR *) rgbValue + 1) = 0; ++ ++ rgbValue++; ++ cbValueMax--; ++ ++ extra_bytes = 1; ++ nread++; ++ ++ if (nread >= colinfo->column_cur_size) ++ ODBC_RETURN_(stmt); ++ } else { ++ if (cbValueMax) ++ *(TDS_CHAR *) rgbValue = 0; ++ odbc_errs_add(&stmt->errs, "01004", "String data, right truncated"); ++ ODBC_RETURN(stmt, SQL_SUCCESS_WITH_INFO); ++ } ++ } else { ++ nread = colinfo->column_text_sqlgetdatapos / 2; ++ if (nread >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ } ++ ++ src += nread; ++ srclen = colinfo->column_cur_size - nread; ++ break; ++ default: ++ if (colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ ++ src += colinfo->column_text_sqlgetdatapos; ++ srclen = colinfo->column_cur_size - colinfo->column_text_sqlgetdatapos; ++ ++ } ++ } else if (fCType == SQL_C_BINARY) { ++ switch (nSybType) { ++ case SYBCHAR: ++ case SYBVARCHAR: ++ case SYBTEXT: ++ case XSYBCHAR: ++ case XSYBVARCHAR: ++ nread = (src[0] == '0' && toupper(src[1]) == 'X')? 2 : 0; ++ ++ while ((nread < colinfo->column_cur_size) && (src[nread] == ' ' || src[nread] == '\0')) ++ nread++; ++ ++ nread += colinfo->column_text_sqlgetdatapos * 2; ++ ++ if (nread && nread >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ ++ src += nread; ++ srclen = colinfo->column_cur_size - nread; ++ break; ++ default: ++ if (colinfo->column_text_sqlgetdatapos > 0 ++ && colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ ++ src += colinfo->column_text_sqlgetdatapos; ++ srclen = colinfo->column_cur_size - colinfo->column_text_sqlgetdatapos; ++ } ++ } else { ++ if (colinfo->column_text_sqlgetdatapos > 0 ++ && colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) ++ ODBC_RETURN(stmt, SQL_NO_DATA); ++ ++ src += colinfo->column_text_sqlgetdatapos; ++ srclen = colinfo->column_cur_size - colinfo->column_text_sqlgetdatapos; ++ } + } else { + if (colinfo->column_text_sqlgetdatapos > 0 +- && colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) ++ && colinfo->column_text_sqlgetdatapos >= colinfo->column_cur_size) + ODBC_RETURN(stmt, SQL_NO_DATA); + + srclen = colinfo->column_cur_size; + } +- nSybType = tds_get_conversion_type(colinfo->column_type, colinfo->column_size); +- if (fCType == SQL_C_DEFAULT) +- fCType = odbc_sql_to_c_type_default(stmt->ird->records[icol - 1].sql_desc_concise_type); +- if (fCType == SQL_ARD_TYPE) { +- if (icol > stmt->ard->header.sql_desc_count) { +- odbc_errs_add(&stmt->errs, "07009", NULL); +- ODBC_RETURN(stmt, SQL_ERROR); +- } +- fCType = stmt->ard->records[icol - 1].sql_desc_concise_type; +- } +- assert(fCType); ++ + *pcbValue = convert_tds2sql(context, nSybType, src, srclen, fCType, (TDS_CHAR *) rgbValue, cbValueMax, NULL); + if (*pcbValue < 0) { + odbc_convert_err_set(&stmt->errs, *pcbValue); + ODBC_RETURN(stmt, SQL_ERROR); + } +- ++ ++ if (extra_bytes) { ++ colinfo->column_text_sqlgetdatapos += extra_bytes; ++ *pcbValue += extra_bytes; ++ } ++ + if (is_variable_type(colinfo->column_type) && (fCType == SQL_C_CHAR || fCType == SQL_C_BINARY)) { + /* calc how many bytes was readed */ + int readed = cbValueMax; +--- ./src/odbc/unittests/Makefile.am.orig 2008-03-12 14:08:11.000000000 -0700 ++++ ./src/odbc/unittests/Makefile.am 2008-08-12 15:44:16.922728186 -0700 +@@ -1,4 +1,4 @@ +-# $Id: Makefile.am,v 1.68.2.3 2008/02/29 09:23:51 freddy77 Exp $ ++# $Id: Makefile.am,v 1.68.2.4 2008/06/06 16:52:23 freddy77 Exp $ + TESTS = \ + t0001$(EXEEXT) t0002$(EXEEXT) t0003$(EXEEXT)\ + t0004$(EXEEXT) connect$(EXEEXT) print$(EXEEXT)\ +@@ -21,7 +21,7 @@ + connect2$(EXEEXT) timeout4$(EXEEXT) freeclose$(EXEEXT) \ + cursor3$(EXEEXT) cursor4$(EXEEXT) cursor5$(EXEEXT) \ + attributes$(EXEEXT) hidden$(EXEEXT) blob1$(EXEEXT) \ +- rowset$(EXEEXT) ++ rowset$(EXEEXT) cursor6$(EXEEXT) + + check_PROGRAMS = $(TESTS) + +@@ -81,6 +81,7 @@ + hidden_SOURCES = hidden.c common.c common.h + blob1_SOURCES = blob1.c common.c common.h + rowset_SOURCES = rowset.c common.c common.h ++cursor6_SOURCES = cursor6.c common.c common.h + + AM_CPPFLAGS = -I$(top_srcdir)/include $(ODBC_INC) -DFREETDS_SRCDIR=\"$(srcdir)\" + if MINGW32 +--- ./src/odbc/unittests/Makefile.in.orig 2008-08-12 15:44:01.807586196 -0700 ++++ ./src/odbc/unittests/Makefile.in 2008-08-12 15:44:16.924736560 -0700 +@@ -13,7 +13,7 @@ + # PARTICULAR PURPOSE. + + @SET_MAKE@ +-SOURCES = $(array_SOURCES) $(array_out_SOURCES) $(attributes_SOURCES) $(binary_test_SOURCES) $(blob1_SOURCES) $(compute_SOURCES) $(connect_SOURCES) $(connect2_SOURCES) $(const_params_SOURCES) $(convert_error_SOURCES) $(copydesc_SOURCES) $(cursor1_SOURCES) $(cursor2_SOURCES) $(cursor3_SOURCES) $(cursor4_SOURCES) $(cursor5_SOURCES) $(data_SOURCES) $(date_SOURCES) $(describecol_SOURCES) $(earlybind_SOURCES) $(error_SOURCES) $(freeclose_SOURCES) $(funccall_SOURCES) $(genparams_SOURCES) $(getdata_SOURCES) $(hidden_SOURCES) $(insert_speed_SOURCES) $(lang_error_SOURCES) $(moreandcount_SOURCES) $(norowset_SOURCES) $(paramcore_SOURCES) $(params_SOURCES) $(prepare_results_SOURCES) $(prepclose_SOURCES) $(preperror_SOURCES) $(print_SOURCES) $(putdata_SOURCES) $(raiserror_SOURCES) $(rebindpar_SOURCES) $(rowset_SOURCES) $(rpc_SOURCES) $(scroll_SOURCES) $(t0001_SOURCES) $(t0002_SOURCES) $(t0003_SOURCES) $(t0004_SOURCES) $(tables_SOURCES) $(testodbc_SOURCES) $(timeout_SOURCES) $(timeout2_SOURCES) $(timeout3_SOURCES) $(timeout4_SOURCES) $(transaction_SOURCES) $(type_SOURCES) $(typeinfo_SOURCES) $(warning_SOURCES) ++SOURCES = $(array_SOURCES) $(array_out_SOURCES) $(attributes_SOURCES) $(binary_test_SOURCES) $(blob1_SOURCES) $(compute_SOURCES) $(connect_SOURCES) $(connect2_SOURCES) $(const_params_SOURCES) $(convert_error_SOURCES) $(copydesc_SOURCES) $(cursor1_SOURCES) $(cursor2_SOURCES) $(cursor3_SOURCES) $(cursor4_SOURCES) $(cursor5_SOURCES) $(cursor6_SOURCES) $(data_SOURCES) $(date_SOURCES) $(describecol_SOURCES) $(earlybind_SOURCES) $(error_SOURCES) $(freeclose_SOURCES) $(funccall_SOURCES) $(genparams_SOURCES) $(getdata_SOURCES) $(hidden_SOURCES) $(insert_speed_SOURCES) $(lang_error_SOURCES) $(moreandcount_SOURCES) $(norowset_SOURCES) $(paramcore_SOURCES) $(params_SOURCES) $(prepare_results_SOURCES) $(prepclose_SOURCES) $(preperror_SOURCES) $(print_SOURCES) $(putdata_SOURCES) $(raiserror_SOURCES) $(rebindpar_SOURCES) $(rowset_SOURCES) $(rpc_SOURCES) $(scroll_SOURCES) $(t0001_SOURCES) $(t0002_SOURCES) $(t0003_SOURCES) $(t0004_SOURCES) $(tables_SOURCES) $(testodbc_SOURCES) $(timeout_SOURCES) $(timeout2_SOURCES) $(timeout3_SOURCES) $(timeout4_SOURCES) $(transaction_SOURCES) $(type_SOURCES) $(typeinfo_SOURCES) $(warning_SOURCES) + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -81,7 +81,7 @@ + connect2$(EXEEXT) timeout4$(EXEEXT) freeclose$(EXEEXT) \ + cursor3$(EXEEXT) cursor4$(EXEEXT) cursor5$(EXEEXT) \ + attributes$(EXEEXT) hidden$(EXEEXT) blob1$(EXEEXT) \ +- rowset$(EXEEXT) ++ rowset$(EXEEXT) cursor6$(EXEEXT) + am_array_OBJECTS = array.$(OBJEXT) common.$(OBJEXT) + array_OBJECTS = $(am_array_OBJECTS) + array_LDADD = $(LDADD) +@@ -130,6 +130,9 @@ + am_cursor5_OBJECTS = cursor5.$(OBJEXT) common.$(OBJEXT) + cursor5_OBJECTS = $(am_cursor5_OBJECTS) + cursor5_LDADD = $(LDADD) ++am_cursor6_OBJECTS = cursor6.$(OBJEXT) common.$(OBJEXT) ++cursor6_OBJECTS = $(am_cursor6_OBJECTS) ++cursor6_LDADD = $(LDADD) + am_data_OBJECTS = data.$(OBJEXT) common.$(OBJEXT) + data_OBJECTS = $(am_data_OBJECTS) + data_LDADD = $(LDADD) +@@ -267,13 +270,13 @@ + $(connect_SOURCES) $(connect2_SOURCES) $(const_params_SOURCES) \ + $(convert_error_SOURCES) $(copydesc_SOURCES) \ + $(cursor1_SOURCES) $(cursor2_SOURCES) $(cursor3_SOURCES) \ +- $(cursor4_SOURCES) $(cursor5_SOURCES) $(data_SOURCES) \ +- $(date_SOURCES) $(describecol_SOURCES) $(earlybind_SOURCES) \ +- $(error_SOURCES) $(freeclose_SOURCES) $(funccall_SOURCES) \ +- $(genparams_SOURCES) $(getdata_SOURCES) $(hidden_SOURCES) \ +- $(insert_speed_SOURCES) $(lang_error_SOURCES) \ +- $(moreandcount_SOURCES) $(norowset_SOURCES) \ +- $(paramcore_SOURCES) $(params_SOURCES) \ ++ $(cursor4_SOURCES) $(cursor5_SOURCES) $(cursor6_SOURCES) \ ++ $(data_SOURCES) $(date_SOURCES) $(describecol_SOURCES) \ ++ $(earlybind_SOURCES) $(error_SOURCES) $(freeclose_SOURCES) \ ++ $(funccall_SOURCES) $(genparams_SOURCES) $(getdata_SOURCES) \ ++ $(hidden_SOURCES) $(insert_speed_SOURCES) \ ++ $(lang_error_SOURCES) $(moreandcount_SOURCES) \ ++ $(norowset_SOURCES) $(paramcore_SOURCES) $(params_SOURCES) \ + $(prepare_results_SOURCES) $(prepclose_SOURCES) \ + $(preperror_SOURCES) $(print_SOURCES) $(putdata_SOURCES) \ + $(raiserror_SOURCES) $(rebindpar_SOURCES) $(rowset_SOURCES) \ +@@ -289,10 +292,10 @@ + $(const_params_SOURCES) $(convert_error_SOURCES) \ + $(copydesc_SOURCES) $(cursor1_SOURCES) $(cursor2_SOURCES) \ + $(cursor3_SOURCES) $(cursor4_SOURCES) $(cursor5_SOURCES) \ +- $(data_SOURCES) $(date_SOURCES) $(describecol_SOURCES) \ +- $(earlybind_SOURCES) $(error_SOURCES) $(freeclose_SOURCES) \ +- $(funccall_SOURCES) $(genparams_SOURCES) $(getdata_SOURCES) \ +- $(hidden_SOURCES) $(insert_speed_SOURCES) \ ++ $(cursor6_SOURCES) $(data_SOURCES) $(date_SOURCES) \ ++ $(describecol_SOURCES) $(earlybind_SOURCES) $(error_SOURCES) \ ++ $(freeclose_SOURCES) $(funccall_SOURCES) $(genparams_SOURCES) \ ++ $(getdata_SOURCES) $(hidden_SOURCES) $(insert_speed_SOURCES) \ + $(lang_error_SOURCES) $(moreandcount_SOURCES) \ + $(norowset_SOURCES) $(paramcore_SOURCES) $(params_SOURCES) \ + $(prepare_results_SOURCES) $(prepclose_SOURCES) \ +@@ -461,7 +464,7 @@ + tds_sysdep_real32_type = @tds_sysdep_real32_type@ + tds_sysdep_real64_type = @tds_sysdep_real64_type@ + +-# $Id: Makefile.am,v 1.68.2.3 2008/02/29 09:23:51 freddy77 Exp $ ++# $Id: Makefile.am,v 1.68.2.4 2008/06/06 16:52:23 freddy77 Exp $ + TESTS = \ + t0001$(EXEEXT) t0002$(EXEEXT) t0003$(EXEEXT)\ + t0004$(EXEEXT) connect$(EXEEXT) print$(EXEEXT)\ +@@ -484,7 +487,7 @@ + connect2$(EXEEXT) timeout4$(EXEEXT) freeclose$(EXEEXT) \ + cursor3$(EXEEXT) cursor4$(EXEEXT) cursor5$(EXEEXT) \ + attributes$(EXEEXT) hidden$(EXEEXT) blob1$(EXEEXT) \ +- rowset$(EXEEXT) ++ rowset$(EXEEXT) cursor6$(EXEEXT) + + t0001_SOURCES = t0001.c common.c + t0002_SOURCES = t0002.c common.c +@@ -636,6 +639,9 @@ + cursor5$(EXEEXT): $(cursor5_OBJECTS) $(cursor5_DEPENDENCIES) + @rm -f cursor5$(EXEEXT) + $(LINK) $(cursor5_LDFLAGS) $(cursor5_OBJECTS) $(cursor5_LDADD) $(LIBS) ++cursor6$(EXEEXT): $(cursor6_OBJECTS) $(cursor6_DEPENDENCIES) ++ @rm -f cursor6$(EXEEXT) ++ $(LINK) $(cursor6_LDFLAGS) $(cursor6_OBJECTS) $(cursor6_LDADD) $(LIBS) + data$(EXEEXT): $(data_OBJECTS) $(data_DEPENDENCIES) + @rm -f data$(EXEEXT) + $(LINK) $(data_LDFLAGS) $(data_OBJECTS) $(data_LDADD) $(LIBS) +@@ -780,6 +786,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor3.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor4.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor5.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor6.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/date.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/describecol.Po@am__quote@ +--- ./src/odbc/unittests/getdata.c.orig 2008-01-29 02:14:31.000000000 -0800 ++++ ./src/odbc/unittests/getdata.c 2008-08-12 15:44:16.926726775 -0700 +@@ -1,6 +1,6 @@ + #include "common.h" + +-static char software_version[] = "$Id: getdata.c,v 1.4.2.1 2008/01/29 10:14:31 freddy77 Exp $"; ++static char software_version[] = "$Id: getdata.c,v 1.4.2.2 2008/06/18 04:11:39 jklowden Exp $"; + static void *no_unused_var_warn[] = { software_version, no_unused_var_warn }; + + static char odbc_err[256]; +@@ -11,7 +11,14 @@ + { + memset(odbc_err, 0, sizeof(odbc_err)); + memset(odbc_sqlstate, 0, sizeof(odbc_sqlstate)); +- if (!SQL_SUCCEEDED(SQLGetDiagRec(SQL_HANDLE_STMT, Statement, 1, (SQLCHAR *) odbc_sqlstate, NULL, (SQLCHAR *) odbc_err, sizeof(odbc_err), NULL))) { ++ if (!SQL_SUCCEEDED(SQLGetDiagRec(SQL_HANDLE_STMT ++ , Statement ++ , 1 ++ , (SQLCHAR *) odbc_sqlstate ++ , NULL ++ , (SQLCHAR *) odbc_err ++ , sizeof(odbc_err) ++ , NULL))) { + printf("SQLGetDiagRec should not fail\n"); + exit(1); + } +--- ./src/odbc/unittests/odbc.dsw.orig 2008-05-07 16:21:44.000000000 -0700 ++++ ./src/odbc/unittests/odbc.dsw 2008-08-12 15:44:17.025728537 -0700 +@@ -673,6 +673,18 @@ + {{{ + }}} + ++############################################################################### ++ ++Project: "cursor6"=.\vc6\cursor6.dsp - Package Owner=<4> ++ ++Package=<5> ++{{{ ++}}} ++ ++Package=<4> ++{{{ ++}}} ++ + + ############################################################################### + +--- ./src/odbc/unittests/odbc.mak.orig 2008-05-07 16:21:44.000000000 -0700 ++++ ./src/odbc/unittests/odbc.mak 2008-08-12 15:44:17.027727972 -0700 +@@ -63,7 +63,8 @@ + "$(OUTDIR)\attributes.exe" \ + "$(OUTDIR)\hidden.exe" \ + "$(OUTDIR)\blob1.exe" \ +- "$(OUTDIR)\rowset.exe" ++ "$(OUTDIR)\rowset.exe" \ ++ "$(OUTDIR)\cursor6.exe" + + CLEAN : + -@erase "$(INTDIR)*.obj" +@@ -249,6 +250,9 @@ + "$(OUTDIR)\rowset.exe" : "$(OUTDIR)" "$(INTDIR)\common.obj" "$(INTDIR)\rowset.obj" + $(LINK32) $(LINK32_FLAGS) "$(INTDIR)\common.obj" "$(INTDIR)\rowset.obj" /pdb:"$(OUTDIR)\rowset.pdb" /out:"$(OUTDIR)\rowset.exe" + ++"$(OUTDIR)\cursor6.exe" : "$(OUTDIR)" "$(INTDIR)\common.obj" "$(INTDIR)\cursor6.obj" ++ $(LINK32) $(LINK32_FLAGS) "$(INTDIR)\common.obj" "$(INTDIR)\cursor6.obj" /pdb:"$(OUTDIR)\cursor6.pdb" /out:"$(OUTDIR)\cursor6.exe" ++ + + + CHECK : +@@ -308,3 +312,4 @@ + "$(OUTDIR)\hidden.exe" + "$(OUTDIR)\blob1.exe" + "$(OUTDIR)\rowset.exe" ++ "$(OUTDIR)\cursor6.exe" +--- ./src/server/server.c.orig 2008-01-07 06:07:21.000000000 -0800 ++++ ./src/server/server.c 2008-08-12 15:44:17.028727828 -0700 +@@ -30,7 +30,7 @@ + #include "tds.h" + #include "tdssrv.h" + +-static char software_version[] = "$Id: server.c,v 1.24 2008/01/07 14:07:21 freddy77 Exp $"; ++static char software_version[] = "$Id: server.c,v 1.24.2.1 2008/05/28 21:08:03 freddy77 Exp $"; + static void *no_unused_var_warn[] = { software_version, no_unused_var_warn }; + + void +@@ -117,13 +117,17 @@ + const char *msgtext, const char *srvname, const char *procname, int line) + { + int msgsz; ++ size_t len; + + tds_put_byte(tds, TDS_INFO_TOKEN); ++ if (!procname) ++ procname = ""; ++ len = strlen(procname); + msgsz = 4 /* msg no */ + + 1 /* msg state */ + + 1 /* severity */ + /* FIXME ucs2 */ +- + (IS_TDS7_PLUS(tds) ? 2 : 1) * (strlen(msgtext) + 1 + strlen(srvname) + 1 + strlen(procname)) ++ + (IS_TDS7_PLUS(tds) ? 2 : 1) * (strlen(msgtext) + 1 + strlen(srvname) + 1 + len) + + 1 + 2; /* line number */ + tds_put_smallint(tds, msgsz); + tds_put_int(tds, msgno); +@@ -135,10 +139,10 @@ + tds_put_byte(tds, strlen(srvname)); + /* FIXME ucs2 */ + tds_put_string(tds, srvname, strlen(srvname)); +- if (procname && strlen(procname)) { +- tds_put_byte(tds, strlen(procname)); ++ if (len) { ++ tds_put_byte(tds, len); + /* FIXME ucs2 */ +- tds_put_string(tds, procname, strlen(procname)); ++ tds_put_string(tds, procname, len); + } else { + tds_put_byte(tds, 0); + } +--- ./src/tds/encodings.h.orig 2008-05-07 16:21:37.000000000 -0700 ++++ ./src/tds/encodings.h 2008-08-12 15:44:17.029735787 -0700 +@@ -1,5 +1,5 @@ + /* +- * This file produced from ../../../src/tds/encodings.pl on Wed May 7 19:21:37 2008 ++ * This file produced from ./encodings.pl on Mon Jul 7 22:46:11 2008 + * $Id: encodings.pl,v 1.10.4.1 2008/03/10 10:07:22 freddy77 Exp $ + */ + static const TDS_ENCODING canonic_charsets[] = { +--- ./src/tds/mem.c.orig 2007-12-31 02:06:50.000000000 -0800 ++++ ./src/tds/mem.c 2008-08-12 15:44:17.129735730 -0700 +@@ -47,7 +47,7 @@ + #include + #endif + +-TDS_RCSID(var, "$Id: mem.c,v 1.175 2007/12/31 10:06:50 freddy77 Exp $"); ++TDS_RCSID(var, "$Id: mem.c,v 1.175.2.1 2008/05/26 12:49:56 freddy77 Exp $"); + + static void tds_free_env(TDSSOCKET * tds); + static void tds_free_compute_results(TDSSOCKET * tds); +@@ -1040,6 +1040,9 @@ + void + tds_free_connection(TDSCONNECTION * connection) + { ++ if (!connection) ++ return; ++ + tds_dstr_free(&connection->server_name); + tds_dstr_free(&connection->client_host_name); + tds_dstr_free(&connection->server_host_name); +--- ./win32/freetds.nsh.orig 2008-05-07 16:21:06.000000000 -0700 ++++ ./win32/freetds.nsh 2008-08-12 15:44:17.130729720 -0700 +@@ -1 +1 @@ +-!define PRODUCT_VERSION "0.82" ++!define PRODUCT_VERSION "0.82.dev.20080707" +--- ./win32/version.rc.orig 2008-05-07 16:21:06.000000000 -0700 ++++ ./win32/version.rc 2008-08-12 15:44:17.131729577 -0700 +@@ -6,8 +6,8 @@ + // + + VS_VERSION_INFO VERSIONINFO +- FILEVERSION 0,82,0,8128 +- PRODUCTVERSION 0,82,0,8128 ++ FILEVERSION 0,81,9999,8189 ++ PRODUCTVERSION 0,81,9999,8189 + FILEFLAGSMASK 0x3fL + #ifdef _DEBUG + FILEFLAGS 0x1L +@@ -25,14 +25,14 @@ + VALUE "Comments", "\0" + VALUE "CompanyName", "FreeTDS.org\0" + VALUE "FileDescription", "FreeTDS\0" +- VALUE "FileVersion", "0, 82, 0, 8128\0" ++ VALUE "FileVersion", "0, 81, 9999, 8189\0" + VALUE "InternalName", "FreeTDS\0" + VALUE "LegalCopyright", "Copyright © 2004-2007 under terms of GNU LGPL\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "FreeTDS.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "FreeTDS ODBC Driver\0" +- VALUE "ProductVersion", "0, 82, 0, 8128\0" ++ VALUE "ProductVersion", "0, 81, 9999, 8189\0" + VALUE "SpecialBuild", "\0" + END + END Index: files/patch-src_tds_iconv.c =================================================================== RCS file: files/patch-src_tds_iconv.c diff -N files/patch-src_tds_iconv.c --- files/patch-src_tds_iconv.c 3 Mar 2007 14:18:19 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ ---- src/tds/iconv.c.orig Sat Jan 13 16:27:13 2007 -+++ src/tds/iconv.c Sat Jan 13 16:29:24 2007 -@@ -973,13 +973,18 @@ tds_srv_charset_changed(TDSSOCKET * tds, - #if HAVE_ICONV_ALWAYS - TDSICONV *char_conv = tds->char_convs[client2server_chardata]; - -- const char *canonic_charset = tds_canonical_charset_name(charset); -+ int canonic_charset_num = tds_canonical_charset(charset); -+ const char *canonic_charset; -+ -+ if (tds->major_version >= 7 && canonic_charset_num == TDS_CHARSET_ISO_8859_1) -+ canonic_charset_num = TDS_CHARSET_CP1252; - - /* ignore request to change to unknown charset */ -- if (!canonic_charset) { -+ if (canonic_charset_num < 0) { - tdsdump_log(TDS_DBG_FUNC, "tds_srv_charset_changed: what is charset \"%s\"?\n", charset); - return; - } -+ canonic_charset = canonic_charsets[canonic_charset_num].name; - - if (strcmp(canonic_charset, char_conv->server_charset.name) == 0) - return;