changeset 1586:4f16f4e90e44

upgrade package freetds to cvs
author Mark Brand <mabrand@mabrand.nl>
date Fri, 18 Feb 2011 13:19:55 +0100
parents 9bbf5054d894
children 5f28f1f3bb98
files src/freetds-1-fastforward.patch
diffstat 1 files changed, 1031 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/freetds-1-fastforward.patch	Fri Feb 18 13:14:48 2011 +0100
+++ b/src/freetds-1-fastforward.patch	Fri Feb 18 13:19:55 2011 +0100
@@ -175321,3 +175321,1034 @@
  <!-- Keep this comment at the end of the file
  Local variables:
  mode: sgml
+
+commit 84a50624c38aec2452a1b5cbb1cb040ce2823531
+Author: jklowden <jklowden>
+Date:   Thu Feb 17 15:55:24 2011 +0000
+
+    default to Win32-Debug
+
+diff --git a/ChangeLog b/ChangeLog
+index e0dacf2..3e15a10 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++Thu Feb 17 10:51:40 EST 2011	JK Lowden <jklowden@freetds.org>
++	* Nmakefile default to Win32-Debug
++	* src/apps/bsqldb.c use sybfront.h, not sqlfront.h
++	* include/sybdb.h include/tds.h src/dblib/dblib.c
++	- src/tds/login.c
++	- indicate if TDS version automatically downgraded
++
+ Sat Feb 12 20:53:19 EST 2011	JK Lowden <jklowden@freetds.org>
+ 	* doc/userguide.sgml	Add linker appendix
+ 
+@@ -3160,4 +3167,4 @@ Wed Jan  9 19:54:43 EST 2008	JK Lowden <jklowden@freetds.org>
+ 	* ChangeLog-0.82 added because of release
+ 	
+ $FreeTDS$
+-$Id: ChangeLog,v 1.3197 2011/02/13 01:54:37 jklowden Exp $
++$Id: ChangeLog,v 1.3198 2011/02/17 15:55:24 jklowden Exp $
+diff --git a/Nmakefile b/Nmakefile
+index 6ad02e9..0b9e46c 100755
+--- a/Nmakefile
++++ b/Nmakefile
+@@ -1,4 +1,4 @@
+-# $Id: Nmakefile,v 1.7 2010/10/13 17:49:17 jklowden Exp $
++# $Id: Nmakefile,v 1.8 2011/02/17 15:55:24 jklowden Exp $
+ # Build FreeTDS and assorted utilities for Win32/Win64 without an IDE. 
+ # Makefiles, unlike Visual Studio project files, are stable over time.  
+ # Contributed to the public domain by James K. Lowden, February 2009
+@@ -13,6 +13,13 @@
+ #	nmake.exe -f Nmakefile -nologo build-win32d
+ #	
+ 
++!IFNDEF PLATFORM
++PLATFORM = Win32
++!ENDIF
++!IFNDEF CONFIGURATION
++CONFIGURATION = Debug
++!ENDIF
++
+ MKDIR = MD
+ MV = move /Y
+ 
+@@ -226,7 +233,7 @@ $(DBLIB_OUT) $(REPLACEMENTS_OUT) $(TDS_OUT) $(APPS_OUT):
+ # If it finds one, it enables the code to generate the header files. 
+ #
+ 
+-!IF 0 == [dir /b /ad CVS]
++!IF 0 == [dir /b /ad CVS 2>NUL:]
+ #
+ # Generate distributed header files
+ #
+
+commit 407615535f2214151e5f4523375c676240337f71
+Author: jklowden <jklowden>
+Date:   Thu Feb 17 15:55:28 2011 +0000
+
+    use sybfront.h, not sqlfront.h
+
+diff --git a/src/apps/bsqldb.c b/src/apps/bsqldb.c
+index 3601b36..0360abd 100644
+--- a/src/apps/bsqldb.c
++++ b/src/apps/bsqldb.c
+@@ -49,11 +49,11 @@
+ #include <locale.h>
+ #endif
+ 
+-#include <sqlfront.h>
++#include <sybfront.h>
+ #include <sybdb.h>
+ #include "replacements.h"
+ 
+-static char software_version[] = "$Id: bsqldb.c,v 1.47 2010/12/21 16:55:24 jklowden Exp $";
++static char software_version[] = "$Id: bsqldb.c,v 1.48 2011/02/17 15:55:28 jklowden Exp $";
+ static void *no_unused_var_warn[] = { software_version, no_unused_var_warn };
+ 
+ #ifdef _WIN32
+
+commit 7df4baa46eb629682521b51d377ef2a4c5cce8f8
+Author: jklowden <jklowden>
+Date:   Thu Feb 17 15:55:36 2011 +0000
+
+    src/tds/login.c indicate if TDS version automatically downgraded
+
+diff --git a/include/sybdb.h b/include/sybdb.h
+index 24901d5..63be6a2 100644
+--- a/include/sybdb.h
++++ b/include/sybdb.h
+@@ -42,7 +42,7 @@ extern "C"
+ #define TDS_STATIC_CAST(type, a) ((type)(a))
+ #endif
+ 
+-static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.98 2011/01/25 06:18:53 jklowden Exp $";
++static const char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.99 2011/02/17 15:55:36 jklowden Exp $";
+ static const void *const no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn };
+ 
+ #ifdef FALSE
+@@ -796,6 +796,7 @@ RETCODE dbstrcpy(DBPROCESS * dbproc, int start, int numbytes, char *dest);
+ int dbstrlen(DBPROCESS * dbproc);
+ DBINT dbvarylen(DBPROCESS * dbproc, int column);
+ 
++#define SYBEVERDOWN	  100	/* TDS version downgraded . */
+ #define SYBEICONVIU	 2400	/* Some character(s) could not be converted into client's character set. */
+ #define SYBEICONVAVAIL	 2401	/* Character set conversion is not available between client character set '%.*s' and server character set '%.*s'.*/
+ #define SYBEICONVO	 2402	/* Error converting characters into server's character set. Some character(s) could not be converted.*/
+diff --git a/include/tds.h b/include/tds.h
+index 3955b48..026b6e3 100644
+--- a/include/tds.h
++++ b/include/tds.h
+@@ -21,7 +21,7 @@
+ #ifndef _tds_h_
+ #define _tds_h_
+ 
+-/* $Id: tds.h,v 1.349 2011/01/17 22:27:40 freddy77 Exp $ */
++/* $Id: tds.h,v 1.350 2011/02/17 15:55:36 jklowden Exp $ */
+ 
+ #include <stdarg.h>
+ #include <stdio.h>
+@@ -283,6 +283,7 @@ enum tds_end
+  * in db-lib and ODBC.  ct-lib maps them to ct-lib numbers (todo). 
+  */
+ typedef enum {	TDSEOK    = TDS_SUCCEED, 
++		TDSEVERDOWN    =  100,
+ 		TDSEICONVIU    = 2400, 
+ 		TDSEICONVAVAIL = 2401, 
+ 		TDSEICONVO     = 2402, 
+diff --git a/src/dblib/dblib.c b/src/dblib/dblib.c
+index 240b304..3d52154 100644
+--- a/src/dblib/dblib.c
++++ b/src/dblib/dblib.c
+@@ -75,7 +75,7 @@
+ #include <dmalloc.h>
+ #endif
+ 
+-TDS_RCSID(var, "$Id: dblib.c,v 1.377 2011/01/14 14:18:15 freddy77 Exp $");
++TDS_RCSID(var, "$Id: dblib.c,v 1.378 2011/02/17 15:55:36 jklowden Exp $");
+ 
+ static RETCODE _dbresults(DBPROCESS * dbproc);
+ static int _db_get_server_type(int bindtype);
+@@ -7515,7 +7515,8 @@ typedef struct _dblib_error_message
+  * an extra NULL to indicate a zero-length format string. 
+  */
+ static const DBLIB_ERROR_MESSAGE dblib_error_messages[] = 
+-	{ { SYBEICONVIU,     EXCONVERSION,	"Some character(s) could not be converted into client's character set\0" }
++	{ { SYBEVERDOWN, 	   EXINFO,	"TDS version downgraded to '%1!'\0%s" }
++	, { SYBEICONVIU,     EXCONVERSION,	"Some character(s) could not be converted into client's character set\0" }
+ 	, { SYBEICONVAVAIL,  EXCONVERSION,	"Character set conversion is not available between client character set '%1!' and "
+ 						"server character set '%2!'\0%s %s" }
+ 	, { SYBEICONVO,      EXCONVERSION,	"Error converting characters into server's character set. Some character(s) could "
+
+commit cacaa90826e86dc8448559e1fac2dbbb079cfa8f
+Author: jklowden <jklowden>
+Date:   Thu Feb 17 21:42:29 2011 +0000
+
+    more help for building under Windows
+
+diff --git a/ChangeLog b/ChangeLog
+index 3e15a10..aed712d 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,6 @@
++Thu Feb 17 16:40:58 EST 2011	JK Lowden <jklowden@freetds.org>
++	* Nmakefile more help for building under Windows
++
+ Thu Feb 17 10:51:40 EST 2011	JK Lowden <jklowden@freetds.org>
+ 	* Nmakefile default to Win32-Debug
+ 	* src/apps/bsqldb.c use sybfront.h, not sqlfront.h
+@@ -3167,4 +3170,4 @@ Wed Jan  9 19:54:43 EST 2008	JK Lowden <jklowden@freetds.org>
+ 	* ChangeLog-0.82 added because of release
+ 	
+ $FreeTDS$
+-$Id: ChangeLog,v 1.3198 2011/02/17 15:55:24 jklowden Exp $
++$Id: ChangeLog,v 1.3199 2011/02/17 21:42:29 jklowden Exp $
+diff --git a/Nmakefile b/Nmakefile
+index 0b9e46c..1ec03d1 100755
+--- a/Nmakefile
++++ b/Nmakefile
+@@ -1,389 +1,17 @@
+-# $Id: Nmakefile,v 1.8 2011/02/17 15:55:24 jklowden Exp $
+-# Build FreeTDS and assorted utilities for Win32/Win64 without an IDE. 
+-# Makefiles, unlike Visual Studio project files, are stable over time.  
+-# Contributed to the public domain by James K. Lowden, February 2009
++# $Id: Nmakefile,v 1.9 2011/02/17 21:42:29 jklowden Exp $
++OTHERS =  Release\BcpStreams.lib x64\Debug\BcpStreams.lib x64\Release\BcpStreams.lib
+ 
+-# Define in the environment or on the command line:
+-# 1. CONFIGURATION = debug/release
+-# 2. PLATFORM = win32/x64
+-# These will determine what is built and where outputs are placed. 
+-#
+-# Example invocations:
+-#	nmake.exe -f Nmakefile -nologo PLATFORM=win32 CONFIGURATION=debug
+-#	nmake.exe -f Nmakefile -nologo build-win32d
+-#	
++all: Debug\BcpStreams.lib $(OTHERS)
+ 
+-!IFNDEF PLATFORM
+-PLATFORM = Win32
+-!ENDIF
+-!IFNDEF CONFIGURATION
+-CONFIGURATION = Debug
+-!ENDIF
+-
+-MKDIR = MD
+-MV = move /Y
+-
+-DBLIB_DIR        = src\dblib
+-REPLACEMENTS_DIR = src\replacements
+-TDS_DIR          = src\tds
+-APPS_DIR         = src\apps
+-
+-DBLIB_OUT        = $(DBLIB_DIR)\$(PLATFORM)\$(CONFIGURATION)
+-REPLACEMENTS_OUT = $(REPLACEMENTS_DIR)\$(PLATFORM)\$(CONFIGURATION)
+-TDS_OUT          = $(TDS_DIR)\$(PLATFORM)\$(CONFIGURATION)
+-APPS_OUT         = $(APPS_DIR)\$(PLATFORM)\$(CONFIGURATION)
+-
+-DBLIB_SRC = 	$(DBLIB_DIR)\bcp.c \
+-		$(DBLIB_DIR)\dblib.c \
+-		$(DBLIB_DIR)\dbopen.c \
+-		$(DBLIB_DIR)\dbutil.c \
+-		$(DBLIB_DIR)\rpc.c \
+-		$(DBLIB_DIR)\xact.c 
+-
+-DBLIB_OBJ = 	$(DBLIB_OUT)\bcp.obj \
+-		$(DBLIB_OUT)\dblib.obj \
+-		$(DBLIB_OUT)\dbopen.obj \
+-		$(DBLIB_OUT)\dbutil.obj \
+-		$(DBLIB_OUT)\rpc.obj \
+-		$(DBLIB_OUT)\xact.obj 
+-
+-REPLACEMENTS_SRC =	$(REPLACEMENTS_DIR)\asprintf.c \
+-			$(REPLACEMENTS_DIR)\basename.c \
+-			$(REPLACEMENTS_DIR)\fakepoll.c \
+-			$(REPLACEMENTS_DIR)\gettimeofday.c \
+-			$(REPLACEMENTS_DIR)\getopt.c \
+-			$(REPLACEMENTS_DIR)\iconv.c \
+-			$(REPLACEMENTS_DIR)\readpassphrase.c \
+-			$(REPLACEMENTS_DIR)\strlcat.c \
+-			$(REPLACEMENTS_DIR)\strlcpy.c \
+-			$(REPLACEMENTS_DIR)\strtok_r.c \
+-			$(REPLACEMENTS_DIR)\vasprintf.c 
+-
+-REPLACEMENTS_OBJ =	$(REPLACEMENTS_OUT)\asprintf.obj \
+-			$(REPLACEMENTS_OUT)\basename.obj \
+-			$(REPLACEMENTS_OUT)\fakepoll.obj \
+-			$(REPLACEMENTS_OUT)\gettimeofday.obj \
+-			$(REPLACEMENTS_OUT)\getopt.obj \
+-			$(REPLACEMENTS_OUT)\iconv.obj \
+-			$(REPLACEMENTS_OUT)\readpassphrase.obj \
+-			$(REPLACEMENTS_OUT)\strlcat.obj \
+-			$(REPLACEMENTS_OUT)\strlcpy.obj \
+-			$(REPLACEMENTS_OUT)\strtok_r.obj \
+-			$(REPLACEMENTS_OUT)\vasprintf.obj 
+-
+-TDS_SRC =	$(TDS_DIR)\bulk.c \
+-		$(TDS_DIR)\challenge.c \
+-		$(TDS_DIR)\config.c \
+-		$(TDS_DIR)\convert.c \
+-		$(TDS_DIR)\data.c \
+-		$(TDS_DIR)\des.c \
+-		$(TDS_DIR)\getmac.c \
+-		$(TDS_DIR)\gssapi.c \
+-		$(TDS_DIR)\hmac_md5.c \
+-		$(TDS_DIR)\iconv.c \
+-		$(TDS_DIR)\locale.c \
+-		$(TDS_DIR)\log.c \
+-		$(TDS_DIR)\login.c \
+-		$(TDS_DIR)\md4.c \
+-		$(TDS_DIR)\md5.c \
+-		$(TDS_DIR)\mem.c \
+-		$(TDS_DIR)\net.c \
+-		$(TDS_DIR)\numeric.c \
+-		$(TDS_DIR)\query.c \
+-		$(TDS_DIR)\read.c \
+-		$(TDS_DIR)\sspi.c \
+-		$(TDS_DIR)\tds_checks.c \
+-		$(TDS_DIR)\tdsstring.c \
+-		$(TDS_DIR)\threadsafe.c \
+-		$(TDS_DIR)\token.c \
+-		$(TDS_DIR)\util.c \
+-		$(TDS_DIR)\vstrbuild.c \
+-		$(TDS_DIR)\win_mutex.c \
+-		$(TDS_DIR)\write.c 
+-
+-TDS_OBJ =	$(TDS_OUT)\bulk.obj \
+-		$(TDS_OUT)\challenge.obj \
+-		$(TDS_OUT)\config.obj \
+-		$(TDS_OUT)\convert.obj \
+-		$(TDS_OUT)\data.obj \
+-		$(TDS_OUT)\des.obj \
+-		$(TDS_OUT)\getmac.obj \
+-		$(TDS_OUT)\gssapi.obj \
+-		$(TDS_OUT)\hmac_md5.obj \
+-		$(TDS_OUT)\iconv.obj \
+-		$(TDS_OUT)\locale.obj \
+-		$(TDS_OUT)\log.obj \
+-		$(TDS_OUT)\login.obj \
+-		$(TDS_OUT)\md4.obj \
+-		$(TDS_OUT)\md5.obj \
+-		$(TDS_OUT)\mem.obj \
+-		$(TDS_OUT)\net.obj \
+-		$(TDS_OUT)\numeric.obj \
+-		$(TDS_OUT)\query.obj \
+-		$(TDS_OUT)\read.obj \
+-		$(TDS_OUT)\sspi.obj \
+-		$(TDS_OUT)\tds_checks.obj \
+-		$(TDS_OUT)\tdsstring.obj \
+-		$(TDS_OUT)\threadsafe.obj \
+-		$(TDS_OUT)\token.obj \
+-		$(TDS_OUT)\util.obj \
+-		$(TDS_OUT)\vstrbuild.obj \
+-		$(TDS_OUT)\win_mutex.obj \
+-		$(TDS_OUT)\write.obj 
+-
+-# not yet:	$(APPS_DIR)\bsqlodbc.c 
+-
+-APPS_SRC =	$(APPS_DIR)\bsqldb.c \
+-		$(APPS_DIR)\datacopy.c \
+-		$(APPS_DIR)\defncopy.c \
+-		$(APPS_DIR)\freebcp.c \
+-		$(APPS_DIR)\tsql.c 
+-
+-APPS_OBJ =	$(APPS_OUT)\bsqldb.obj \
+-		$(APPS_OUT)\datacopy.obj \
+-		$(APPS_OUT)\defncopy.obj \
+-		$(APPS_OUT)\freebcp.obj \
+-		$(APPS_OUT)\tsql.obj 
+-
+-APPS_EXE =	$(APPS_OUT)\bsqldb.exe \
+-		$(APPS_OUT)\datacopy.exe \
+-		$(APPS_OUT)\defncopy.exe \
+-		$(APPS_OUT)\freebcp.exe \
+-		$(APPS_OUT)\tsql.exe 
+-
+-db-lib: $(DBLIB_OUT)\db-lib.lib 
+-
+-apps: $(DBLIB_OUT)\db-lib.lib $(APPS_EXE)
+-tsql: $(APPS_OUT)\tsql.exe 
+-bsqldb: $(APPS_OUT)\bsqldb.exe
+-help:
+-	@echo targets: db-lib, apps, tsql, bsqldb
+-
+-##(APPS_OUT)\bsqldb.exe: $(APPS_DIR)\bsqldb.exe $(DBLIB_OUT)\db-lib.lib
+-# Don't know how to create this dependency without explicitly defining every output. 
+-
+-#
+-# Sadly the environment settings for building for different architectures
+-# is undocumented.  Microsoft's directions are to run the requisite 
+-# batch file without explaining what it does.  While it's possible to 
+-# read the file -- and it's not complicated -- it's impossible to 
+-# know the purpose of setting PATH/INCLUDE/LIB just so.  Worse, the 
+-# settings are per-machine, and if the file is lost, the only way to 
+-# recreate it is to reinstall the compiler.  
+-#
+-# The "solution" is to follow their advice.  Run vcvarsall.bat with the 
+-# appropriate argument to set up the environment, and go from there.  
+-#
+-# As of this writing, the variables are:
+-# x86 Native: Vcvarsall "x86" 
+-# x64 Native: Vcvarsall "amd64"
+-# x64 Cross:  Vcvarsall "x86_amd64"
+-#
+-
+-# Check that cl.exe is in the PATH.  Cf. "help FOR" to see how this works.  
+-# See above comments regarding environment setup.  
+-#
+-COMPILER = cl.exe
+-!IF 0 != [for /f %I in ("$(COMPILER)") DO @dir /b "%~dp$$PATH:I\$(COMPILER)" > NUL:]
+-!MESSAGE cl.exe not in PATH
+-!ERROR Perhaps run vcvarsall.bat to set up the command-line development environment?
+-!ENDIF
+-
+-all: build-win32d build-win32r build-win64d build-win64r
+-
+-build-win32d: 
+-	$(MAKE) -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=debug
+-build-win32r: 
+-	$(MAKE) -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=release
+-build-win64d: 
+-	$(MAKE) -fNmakefile -nologo apps PLATFORM=win64 CONFIGURATION=debug
+-build-win64r: 
+-	$(MAKE) -fNmakefile -nologo apps PLATFORM=win64 CONFIGURATION=release
+-
+-clean:
+-	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
+-	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
+-	if exist $(DBLIB_OUT) 		del /q $(DBLIB_OUT)\*.obj 
+-	if exist $(REPLACEMENTS_OUT) 	del /q $(REPLACEMENTS_OUT)\*.obj 
+-	if exist $(TDS_OUT) 		del /q $(TDS_OUT)\*.obj 
+-	if exist $(APPS_OUT) 		del /q $(APPS_OUT)\*.obj $(APPS_OUT)\*.exe
+-
+-clean-app:
+-	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
+-	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
+-	if exist $(APPS_OUT) 		del /q $(APPS_OUT)\*.obj $(APPS_OUT)\*.exe
+-
+-# Create output directories
+-$(DBLIB_OUT) $(REPLACEMENTS_OUT) $(TDS_OUT) $(APPS_OUT):
+-	@echo creating output directory for configuration: "$(PLATFORM)|$(CONFIGURATION)"
+-	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
+-	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
+-	$(MKDIR) $@
+-
+-#
+-# Some header files are generated with Perl for consistency.  
+-# The Perl scripts are maintained in CVS, and someone developing 
+-# with CVS needs Perl to build FreeTDS.  
+-#
+-# To avoid any dependency on Perl for everyone else, the 
+-# distribution tarball contains the pre-generated files.  
+-#
+-# The preprocessing test below checks for the existence of a CVS 
+-# directory, which wouldn't be present in a freshly unpacked tarball.  
+-# If it finds one, it enables the code to generate the header files. 
+-#
+-
+-!IF 0 == [dir /b /ad CVS 2>NUL:]
+-#
+-# Generate distributed header files
+-#
+-include\tdsver.h:
+-	perl -e"@a=localtime; printf qq(#undef  TDS_VERSION_NO\n#define TDS_VERSION_NO \"freetds v0.83.dev.%d%02d%02d\"\n), 1900+$$a[5], 1+$$a[-1], $$a[3]" \
+-	> $@.err 
+-	move /Y $@.err $@
+-
+-src\tds\types.h:
+-	perl src\tds\types.pl misc\types.txt > $@.err
+-	move /Y $@.err $@
+-
+-src\tds\tds_willconvert.h: src\tds\tds_willconvert.pl
+-	perl src\tds\tds_willconvert.pl > $@.tmp
+-	$(MV) $@.tmp $@
+-
+-src\tds\encodings.h: src\tds\encodings.pl src\tds\alternative_character_sets.h
+-	perl src\tds\encodings.pl src\tds > $@.tmp 2> NUL:
+-	$(MV) $@.tmp $@
+-
+-src\tds\num_limits.h: src\tds\num_limits.pl
+-	perl src\tds\num_limits.pl > $@.tmp
+-	$(MV) $@.tmp $@
+-!ENDIF
+-
+-GENERATED_FILES = include\tdsver.h src\tds\types.h \
+-	src\tds\tds_willconvert.h src\tds\encodings.h src\tds\num_limits.h
+-
+-$(DBLIB_OUT)\db-lib.lib: $(GENERATED_FILES) $(DBLIB_OUT) $(DBLIB_OBJ) $(REPLACEMENTS_OUT)\replacements.lib $(TDS_OUT)\tds.lib
+-	@echo building $@ >&2
+-	lib -nologo -out:"$@" 	$(DBLIB_OBJ) \
+-				$(REPLACEMENTS_OUT)\replacements.lib \
+-				$(TDS_OUT)\tds.lib
+-$(REPLACEMENTS_OUT)\replacements.lib: $(REPLACEMENTS_OUT) $(REPLACEMENTS_OBJ)
+-	lib -nologo -out:"$@" $(REPLACEMENTS_OBJ) 
+-$(TDS_OUT)\tds.lib: $(TDS_OUT) $(TDS_OBJ)
+-	lib -nologo -out:"$@" $(TDS_OBJ) 
+-
+-#
+-# set compiler flags
+-#
+-INC = 	-I "include" -I "win32" -I "include\x64" 
+-FLG = 	-nologo	-W3 -Wp64 -EHsc -TC -Gm  -errorReport:prompt 
+-DEF = 	-D "_MBCS" -D "_LIB" -D "WIN32" \
+-	-D "_CRT_SECURE_NO_WARNINGS" -D _CRT_NONSTDC_NO_DEPRECATE \
+-	-D "HAVE_CONFIG_H" \
+-	-D "_FREETDS_LIBRARY_SOURCE" 
+-DBG = -MTd -Od -D "_DEBUG"  -ZI -RTC1	
+-REL = -MT  -O2 -D "_NDEBUG" -Zi
+-
+-MSLIBS = Ws2_32.lib shell32.lib	
+-
+-CC = cl $(CFLAGS) $(FLG) $(DEF) $(INC)
+-CC32 = $(CC)
+-CC64 = $(CC)
+-
+-## Rules ##
+-
+-#
+-# dblib
+-#
+-#c.{$(DBLIB_DIR)\win32\debug}.obj::
+-{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\win32\debug}.obj::
+-	$(CC32) -c $(DBG) 	-Fo"$(DBLIB_OUT)\\" \
+-				-Fd"$(DBLIB_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(DBLIB_DIR)\}.c{$(DBLIB_DIR)\win32\release}.obj::
+-	$(CC32) -c $(REL) 	-Fo"$(DBLIB_OUT)\\" \
+-				-Fd"$(DBLIB_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\x64\debug}.obj::
+-	$(CC64) -c $(DBG) 	-Fo"$(DBLIB_OUT)\\" \
+-				-Fd"$(DBLIB_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\x64\release}.obj::
+-	$(CC64) -c $(REL) 	-Fo"$(DBLIB_OUT)\\" \
+-				-Fd"$(DBLIB_OUT)\vc80.pdb" \
+-	$<
+-
+-#
+-# replacements
+-#
+-{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\win32\debug}.obj::
+-	$(CC32) -c $(DBG) 	-Fo"$(REPLACEMENTS_OUT)\\" \
+-				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\win32\release}.obj::
+-	$(CC32) -c $(REL) 	-Fo"$(REPLACEMENTS_OUT)\\" \
+-				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\x64\debug}.obj::
+-	$(CC64) -c $(DBG) 	-Fo"$(REPLACEMENTS_OUT)\\" \
+-			-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
+-	$<		
+-
+-{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\x64\release}.obj::
+-	$(CC64) -c $(REL) 	-Fo"$(REPLACEMENTS_OUT)\\" \
+-				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
+-	$<
+-
+-#
+-# tds
+-#
+-{$(TDS_DIR)}.c{$(TDS_DIR)\win32\debug}.obj::
+-	$(CC32) -c $(DBG) 	-Fo"$(TDS_OUT)\\" \
+-				-Fd"$(TDS_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(TDS_DIR)}.c{$(TDS_DIR)\win32\release}.obj::
+-	$(CC32) -c $(REL) 	-Fo"$(TDS_OUT)\\" \
+-				-Fd"$(TDS_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(TDS_DIR)}.c{$(TDS_DIR)\x64\debug}.obj::
+-	$(CC64) -c $(DBG) 	-Fo"$(TDS_OUT)\\" \
+-				-Fd"$(TDS_OUT)\vc80.pdb" \
+-	$<
+-
+-{$(TDS_DIR)}.c{$(TDS_DIR)\x64\release}.obj::
+-	$(CC64) -c $(REL) 	-Fo"$(TDS_OUT)\\" \
+-				-Fd"$(TDS_OUT)\vc80.pdb" \
+-	$<
+-
+-#
+-# Utilities
+-#
+-$(APPS_EXE): $(DBLIB_OUT)\db-lib.lib
+-
+-{$(APPS_DIR)}.c{$(APPS_DIR)\win32\debug}.exe:
+-	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
+-	$(CC32) $(DBG) 	-Fd"$(APPS_OUT)\vc80.pdb" -Fe$@ \
+-	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
++$(OTHERS): 
++	vcbuild BcpStreams.sln
+ 	
+-{$(APPS_DIR)\}.c{$(APPS_DIR)\win32\release}.exe:
+-	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
+-	$(CC32) $(REL) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
+-	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
+-
+-{$(APPS_DIR)}.c{$(APPS_DIR)\x64\debug}.exe:
+-	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
+-	$(CC64) $(DBG) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
+-	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
++debug32: Debug\BcpStreams.lib
+ 
+-{$(APPS_DIR)}.c{$(APPS_DIR)\x64\release}.exe:
+-	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
+-	$(CC64) $(REL) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
+-	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
++Debug\BcpStreams.lib: 
++	vcbuild BcpStreams.sln "Debug|Win32" 
+ 
++# DebugST\BcpStreams.lib
++# Release\BcpStreams.lib
++# x64\Debug\BcpStreams.lib
++# x64\Release\BcpStreams.lib
+\ No newline at end of file
+diff --git a/src/tds/login.c b/src/tds/login.c
+index 9cdb942..bc25aac 100644
+--- a/src/tds/login.c
++++ b/src/tds/login.c
+@@ -51,7 +51,7 @@
+ #include <dmalloc.h>
+ #endif
+ 
+-TDS_RCSID(var, "$Id: login.c,v 1.201 2010/11/30 10:55:43 freddy77 Exp $");
++TDS_RCSID(var, "$Id: login.c,v 1.202 2011/02/17 21:42:29 jklowden Exp $");
+ 
+ static int tds_send_login(TDSSOCKET * tds, TDSCONNECTION * connection);
+ static int tds8_do_login(TDSSOCKET * tds, TDSCONNECTION * connection);
+@@ -333,8 +333,10 @@ tds_connect(TDSSOCKET * tds, TDSCONNECTION * connection, int *p_oserr)
+ 		};
+ 
+ 	/* disable tds9 if iconv wanted, currently not supported */
+-	if (IS_TDS72_PLUS(connection) && tds->use_iconv)
++	if (IS_TDS72_PLUS(connection) && tds->use_iconv) {
+ 		connection->tds_version = 0x701;
++		tdserror(tds->tds_ctx, tds, TDSEVERDOWN, 0);
++	}
+ 
+ 	if (TDS_MAJOR(connection) == 0) {
+ 		unsigned int i;
+
+commit 6fc48ae463c4058ec1c89e368c19fa2b8846523f
+Author: jklowden <jklowden>
+Date:   Thu Feb 17 22:12:22 2011 +0000
+
+    fix oops
+
+diff --git a/Nmakefile b/Nmakefile
+index 1ec03d1..f2d0060 100755
+--- a/Nmakefile
++++ b/Nmakefile
+@@ -1,17 +1,392 @@
+-# $Id: Nmakefile,v 1.9 2011/02/17 21:42:29 jklowden Exp $
+-OTHERS =  Release\BcpStreams.lib x64\Debug\BcpStreams.lib x64\Release\BcpStreams.lib
++# $Id: Nmakefile,v 1.10 2011/02/17 22:12:22 jklowden Exp $
++# Build FreeTDS and assorted utilities for Win32/Win64 without an IDE. 
++# Makefiles, unlike Visual Studio project files, are stable over time.  
++# Contributed to the public domain by James K. Lowden, February 2009
+ 
+-all: Debug\BcpStreams.lib $(OTHERS)
++# Define in the environment or on the command line:
++# 1. CONFIGURATION = debug/release
++# 2. PLATFORM = win32/x64
++# These will determine what is built and where outputs are placed. 
++#
++# Example invocations:
++#	nmake.exe -f Nmakefile -nologo PLATFORM=win32 CONFIGURATION=debug
++#	nmake.exe -f Nmakefile -nologo build-win32d
++#	
+ 
+-$(OTHERS): 
+-	vcbuild BcpStreams.sln
++!IFNDEF PLATFORM
++PLATFORM = Win32
++!ENDIF
++!IFNDEF CONFIGURATION
++CONFIGURATION = Debug
++!ENDIF
++
++MKDIR = MD
++MV = move /Y
++
++DBLIB_DIR        = src\dblib
++REPLACEMENTS_DIR = src\replacements
++TDS_DIR          = src\tds
++APPS_DIR         = src\apps
++
++DBLIB_OUT        = $(DBLIB_DIR)\$(PLATFORM)\$(CONFIGURATION)
++REPLACEMENTS_OUT = $(REPLACEMENTS_DIR)\$(PLATFORM)\$(CONFIGURATION)
++TDS_OUT          = $(TDS_DIR)\$(PLATFORM)\$(CONFIGURATION)
++APPS_OUT         = $(APPS_DIR)\$(PLATFORM)\$(CONFIGURATION)
++
++DBLIB_SRC = 	$(DBLIB_DIR)\bcp.c \
++		$(DBLIB_DIR)\dblib.c \
++		$(DBLIB_DIR)\dbopen.c \
++		$(DBLIB_DIR)\dbutil.c \
++		$(DBLIB_DIR)\rpc.c \
++		$(DBLIB_DIR)\xact.c 
++
++DBLIB_OBJ = 	$(DBLIB_OUT)\bcp.obj \
++		$(DBLIB_OUT)\dblib.obj \
++		$(DBLIB_OUT)\dbopen.obj \
++		$(DBLIB_OUT)\dbutil.obj \
++		$(DBLIB_OUT)\rpc.obj \
++		$(DBLIB_OUT)\xact.obj 
++
++REPLACEMENTS_SRC =	$(REPLACEMENTS_DIR)\asprintf.c \
++			$(REPLACEMENTS_DIR)\basename.c \
++			$(REPLACEMENTS_DIR)\fakepoll.c \
++			$(REPLACEMENTS_DIR)\gettimeofday.c \
++			$(REPLACEMENTS_DIR)\getopt.c \
++			$(REPLACEMENTS_DIR)\iconv.c \
++			$(REPLACEMENTS_DIR)\readpassphrase.c \
++			$(REPLACEMENTS_DIR)\strlcat.c \
++			$(REPLACEMENTS_DIR)\strlcpy.c \
++			$(REPLACEMENTS_DIR)\strtok_r.c \
++			$(REPLACEMENTS_DIR)\vasprintf.c 
++
++REPLACEMENTS_OBJ =	$(REPLACEMENTS_OUT)\asprintf.obj \
++			$(REPLACEMENTS_OUT)\basename.obj \
++			$(REPLACEMENTS_OUT)\fakepoll.obj \
++			$(REPLACEMENTS_OUT)\gettimeofday.obj \
++			$(REPLACEMENTS_OUT)\getopt.obj \
++			$(REPLACEMENTS_OUT)\iconv.obj \
++			$(REPLACEMENTS_OUT)\readpassphrase.obj \
++			$(REPLACEMENTS_OUT)\strlcat.obj \
++			$(REPLACEMENTS_OUT)\strlcpy.obj \
++			$(REPLACEMENTS_OUT)\strtok_r.obj \
++			$(REPLACEMENTS_OUT)\vasprintf.obj 
++
++TDS_SRC =	$(TDS_DIR)\bulk.c \
++		$(TDS_DIR)\challenge.c \
++		$(TDS_DIR)\config.c \
++		$(TDS_DIR)\convert.c \
++		$(TDS_DIR)\data.c \
++		$(TDS_DIR)\des.c \
++		$(TDS_DIR)\getmac.c \
++		$(TDS_DIR)\gssapi.c \
++		$(TDS_DIR)\hmac_md5.c \
++		$(TDS_DIR)\iconv.c \
++		$(TDS_DIR)\locale.c \
++		$(TDS_DIR)\log.c \
++		$(TDS_DIR)\login.c \
++		$(TDS_DIR)\md4.c \
++		$(TDS_DIR)\md5.c \
++		$(TDS_DIR)\mem.c \
++		$(TDS_DIR)\net.c \
++		$(TDS_DIR)\numeric.c \
++		$(TDS_DIR)\ptw32_MCS_lock.c \
++		$(TDS_DIR)\query.c \
++		$(TDS_DIR)\read.c \
++		$(TDS_DIR)\sspi.c \
++		$(TDS_DIR)\tds_checks.c \
++		$(TDS_DIR)\tdsstring.c \
++		$(TDS_DIR)\threadsafe.c \
++		$(TDS_DIR)\token.c \
++		$(TDS_DIR)\util.c \
++		$(TDS_DIR)\vstrbuild.c \
++		$(TDS_DIR)\win_mutex.c \
++		$(TDS_DIR)\write.c 
++
++TDS_OBJ =	$(TDS_OUT)\bulk.obj \
++		$(TDS_OUT)\challenge.obj \
++		$(TDS_OUT)\config.obj \
++		$(TDS_OUT)\convert.obj \
++		$(TDS_OUT)\data.obj \
++		$(TDS_OUT)\des.obj \
++		$(TDS_OUT)\getmac.obj \
++		$(TDS_OUT)\gssapi.obj \
++		$(TDS_OUT)\hmac_md5.obj \
++		$(TDS_OUT)\iconv.obj \
++		$(TDS_OUT)\locale.obj \
++		$(TDS_OUT)\log.obj \
++		$(TDS_OUT)\login.obj \
++		$(TDS_OUT)\md4.obj \
++		$(TDS_OUT)\md5.obj \
++		$(TDS_OUT)\mem.obj \
++		$(TDS_OUT)\net.obj \
++		$(TDS_OUT)\numeric.obj \
++		$(TDS_OUT)\ptw32_MCS_lock.obj \
++		$(TDS_OUT)\query.obj \
++		$(TDS_OUT)\read.obj \
++		$(TDS_OUT)\sspi.obj \
++		$(TDS_OUT)\tds_checks.obj \
++		$(TDS_OUT)\tdsstring.obj \
++		$(TDS_OUT)\threadsafe.obj \
++		$(TDS_OUT)\token.obj \
++		$(TDS_OUT)\util.obj \
++		$(TDS_OUT)\vstrbuild.obj \
++		$(TDS_OUT)\win_mutex.obj \
++		$(TDS_OUT)\write.obj 
++
++# not yet:	$(APPS_DIR)\bsqlodbc.c 
++
++APPS_SRC =	$(APPS_DIR)\bsqldb.c \
++		$(APPS_DIR)\datacopy.c \
++		$(APPS_DIR)\defncopy.c \
++		$(APPS_DIR)\freebcp.c \
++		$(APPS_DIR)\tsql.c 
++
++APPS_OBJ =	$(APPS_OUT)\bsqldb.obj \
++		$(APPS_OUT)\datacopy.obj \
++		$(APPS_OUT)\defncopy.obj \
++		$(APPS_OUT)\freebcp.obj \
++		$(APPS_OUT)\tsql.obj 
++
++APPS_EXE =	$(APPS_OUT)\bsqldb.exe \
++		$(APPS_OUT)\datacopy.exe \
++		$(APPS_OUT)\defncopy.exe \
++		$(APPS_OUT)\freebcp.exe \
++		$(APPS_OUT)\tsql.exe 
++
++db-lib: $(DBLIB_OUT)\db-lib.lib 
++
++apps: $(DBLIB_OUT)\db-lib.lib $(APPS_EXE)
++tsql: $(APPS_OUT)\tsql.exe 
++bsqldb: $(APPS_OUT)\bsqldb.exe
++help:
++	@echo targets: db-lib, apps, tsql, bsqldb
++
++##(APPS_OUT)\bsqldb.exe: $(APPS_DIR)\bsqldb.exe $(DBLIB_OUT)\db-lib.lib
++# Don't know how to create this dependency without explicitly defining every output. 
++
++#
++# Sadly the environment settings for building for different architectures
++# is undocumented.  Microsoft's directions are to run the requisite 
++# batch file without explaining what it does.  While it's possible to 
++# read the file -- and it's not complicated -- it's impossible to 
++# know the purpose of setting PATH/INCLUDE/LIB just so.  Worse, the 
++# settings are per-machine, and if the file is lost, the only way to 
++# recreate it is to reinstall the compiler.  
++#
++# The "solution" is to follow their advice.  Run vcvarsall.bat with the 
++# appropriate argument to set up the environment, and go from there.  
++#
++# As of this writing, the variables are:
++# x86 Native: Vcvarsall "x86" 
++# x64 Native: Vcvarsall "amd64"
++# x64 Cross:  Vcvarsall "x86_amd64"
++#
++
++# Check that cl.exe is in the PATH.  Cf. "help FOR" to see how this works.  
++# See above comments regarding environment setup.  
++#
++COMPILER = cl.exe
++!IF 0 != [for /f %I in ("$(COMPILER)") DO @dir /b "%~dp$$PATH:I\$(COMPILER)" > NUL:]
++!MESSAGE cl.exe not in PATH
++!ERROR Perhaps run vcvarsall.bat to set up the command-line development environment?
++!ENDIF
++
++all: build-win32d build-win32r build-win64d build-win64r
++
++build-win32d: 
++	$(MAKE) -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=debug
++build-win32r: 
++	$(MAKE) -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=release
++build-win64d: 
++	$(MAKE) -fNmakefile -nologo apps PLATFORM=win64 CONFIGURATION=debug
++build-win64r: 
++	$(MAKE) -fNmakefile -nologo apps PLATFORM=win64 CONFIGURATION=release
++
++clean:
++	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
++	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
++	if exist $(DBLIB_OUT) 		del /q $(DBLIB_OUT)\*.obj  $(DBLIB_OUT)\*.lib 
++	if exist $(REPLACEMENTS_OUT) 	del /q $(REPLACEMENTS_OUT)\*.obj $(REPLACEMENTS_OUT)\*.lib
++	if exist $(TDS_OUT) 		del /q $(TDS_OUT)\*.obj $(TDS_OUT)\*.lib
++	if exist $(APPS_OUT) 		del /q $(APPS_OUT)\*.obj $(APPS_OUT)\*.exe
++
++clean-app:
++	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
++	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
++	if exist $(APPS_OUT) 		del /q $(APPS_OUT)\*.obj $(APPS_OUT)\*.exe
++
++# Create output directories
++$(DBLIB_OUT) $(REPLACEMENTS_OUT) $(TDS_OUT) $(APPS_OUT):
++	@echo creating output directory for configuration: "$(PLATFORM)|$(CONFIGURATION)"
++	@if "" equ "$(PLATFORM)" 	PLATFORM not defined, see comments in Nmakefile >&2 && exit 1
++	@if "" equ "$(CONFIGURATION)" 	CONFIGURATION not defined, see comments in Nmakefile >&2 && exit 1
++	$(MKDIR) $@
++
++#
++# Some header files are generated with Perl for consistency.  
++# The Perl scripts are maintained in CVS, and someone developing 
++# with CVS needs Perl to build FreeTDS.  
++#
++# To avoid any dependency on Perl for everyone else, the 
++# distribution tarball contains the pre-generated files.  
++#
++# The preprocessing test below checks for the existence of a CVS 
++# directory, which wouldn't be present in a freshly unpacked tarball.  
++# If it finds one, it enables the code to generate the header files. 
++#
++
++!IF 0 == [dir /b /ad CVS 2>NUL:]
++#
++# Generate distributed header files
++#
++include\tdsver.h:
++	perl -e"@a=localtime; printf qq(#undef  TDS_VERSION_NO\n#define TDS_VERSION_NO \"freetds v0.83.dev.%d%02d%02d\"\n), 1900+$$a[5], 1+$$a[-1], $$a[3]" \
++	> $@.err 
++	move /Y $@.err $@
++
++src\tds\types.h:
++	perl src\tds\types.pl misc\types.txt > $@.err
++	move /Y $@.err $@
++
++src\tds\tds_willconvert.h: src\tds\tds_willconvert.pl
++	perl src\tds\tds_willconvert.pl > $@.tmp
++	$(MV) $@.tmp $@
++
++src\tds\encodings.h: src\tds\encodings.pl src\tds\alternative_character_sets.h
++	perl src\tds\encodings.pl src\tds > $@.tmp 2> NUL:
++	$(MV) $@.tmp $@
++
++src\tds\num_limits.h: src\tds\num_limits.pl
++	perl src\tds\num_limits.pl > $@.tmp
++	$(MV) $@.tmp $@
++!ENDIF
++
++GENERATED_FILES = include\tdsver.h src\tds\types.h \
++	src\tds\tds_willconvert.h src\tds\encodings.h src\tds\num_limits.h
++
++$(DBLIB_OUT)\db-lib.lib: $(GENERATED_FILES) $(DBLIB_OUT) $(DBLIB_OBJ) $(REPLACEMENTS_OUT)\replacements.lib $(TDS_OUT)\tds.lib
++	@echo building $@ >&2
++	lib -nologo -out:"$@" 	$(DBLIB_OBJ) \
++				$(REPLACEMENTS_OUT)\replacements.lib \
++				$(TDS_OUT)\tds.lib
++$(REPLACEMENTS_OUT)\replacements.lib: $(REPLACEMENTS_OUT) $(REPLACEMENTS_OBJ)
++	lib -nologo -out:"$@" $(REPLACEMENTS_OBJ) 
++$(TDS_OUT)\tds.lib: $(TDS_OUT) $(TDS_OBJ)
++	lib -nologo -out:"$@" $(TDS_OBJ) 
++
++#
++# set compiler flags
++#
++INC = 	-I "include" -I "win32" -I "include\x64" 
++FLG = 	-nologo	-W3 -Wp64 -EHsc -TC -Gm  -errorReport:prompt 
++DEF = 	-D "_MBCS" -D "_LIB" -D "WIN32" \
++	-D MSDBLIB \
++	-D "_CRT_SECURE_NO_WARNINGS" -D _CRT_NONSTDC_NO_DEPRECATE \
++	-D "HAVE_CONFIG_H" \
++	-D "_FREETDS_LIBRARY_SOURCE" 
++DBG = -MTd -Od -D "_DEBUG"  -ZI -RTC1	
++REL = -MT  -O2 -D "_NDEBUG" -Zi
++
++MSLIBS = Ws2_32.lib shell32.lib	
++
++CC = cl $(CFLAGS) $(FLG) $(DEF) $(INC)
++CC32 = $(CC)
++CC64 = $(CC)
++
++## Rules ##
++
++#
++# dblib
++#
++#c.{$(DBLIB_DIR)\win32\debug}.obj::
++{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\win32\debug}.obj::
++	$(CC32) -c $(DBG) 	-Fo"$(DBLIB_OUT)\\" \
++				-Fd"$(DBLIB_OUT)\vc80.pdb" \
++	$<
++
++{$(DBLIB_DIR)\}.c{$(DBLIB_DIR)\win32\release}.obj::
++	$(CC32) -c $(REL) 	-Fo"$(DBLIB_OUT)\\" \
++				-Fd"$(DBLIB_OUT)\vc80.pdb" \
++	$<
++
++{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\x64\debug}.obj::
++	$(CC64) -c $(DBG) 	-Fo"$(DBLIB_OUT)\\" \
++				-Fd"$(DBLIB_OUT)\vc80.pdb" \
++	$<
++
++{$(DBLIB_DIR)}.c{$(DBLIB_DIR)\x64\release}.obj::
++	$(CC64) -c $(REL) 	-Fo"$(DBLIB_OUT)\\" \
++				-Fd"$(DBLIB_OUT)\vc80.pdb" \
++	$<
++
++#
++# replacements
++#
++{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\win32\debug}.obj::
++	$(CC32) -c $(DBG) 	-Fo"$(REPLACEMENTS_OUT)\\" \
++				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
++	$<
++
++{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\win32\release}.obj::
++	$(CC32) -c $(REL) 	-Fo"$(REPLACEMENTS_OUT)\\" \
++				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
++	$<
++
++{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\x64\debug}.obj::
++	$(CC64) -c $(DBG) 	-Fo"$(REPLACEMENTS_OUT)\\" \
++			-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
++	$<		
++
++{$(REPLACEMENTS_DIR)}.c{$(REPLACEMENTS_DIR)\x64\release}.obj::
++	$(CC64) -c $(REL) 	-Fo"$(REPLACEMENTS_OUT)\\" \
++				-Fd"$(REPLACEMENTS_OUT)\vc80.pdb" \
++	$<
++
++#
++# tds
++#
++{$(TDS_DIR)}.c{$(TDS_DIR)\win32\debug}.obj::
++	$(CC32) -c $(DBG) 	-Fo"$(TDS_OUT)\\" \
++				-Fd"$(TDS_OUT)\vc80.pdb" \
++	$<
++
++{$(TDS_DIR)}.c{$(TDS_DIR)\win32\release}.obj::
++	$(CC32) -c $(REL) 	-Fo"$(TDS_OUT)\\" \
++				-Fd"$(TDS_OUT)\vc80.pdb" \
++	$<
++
++{$(TDS_DIR)}.c{$(TDS_DIR)\x64\debug}.obj::
++	$(CC64) -c $(DBG) 	-Fo"$(TDS_OUT)\\" \
++				-Fd"$(TDS_OUT)\vc80.pdb" \
++	$<
++
++{$(TDS_DIR)}.c{$(TDS_DIR)\x64\release}.obj::
++	$(CC64) -c $(REL) 	-Fo"$(TDS_OUT)\\" \
++				-Fd"$(TDS_OUT)\vc80.pdb" \
++	$<
++
++#
++# Utilities
++#
++$(APPS_EXE): $(DBLIB_OUT)\db-lib.lib
++
++{$(APPS_DIR)}.c{$(APPS_DIR)\win32\debug}.exe:
++	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
++	$(CC32) $(DBG) 	-Fd"$(APPS_OUT)\vc80.pdb" -Fe$@ \
++	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
+ 	
+-debug32: Debug\BcpStreams.lib
++{$(APPS_DIR)\}.c{$(APPS_DIR)\win32\release}.exe:
++	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
++	$(CC32) $(REL) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
++	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
++
++{$(APPS_DIR)}.c{$(APPS_DIR)\x64\debug}.exe:
++	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
++	$(CC64) $(DBG) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
++	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
+ 
+-Debug\BcpStreams.lib: 
+-	vcbuild BcpStreams.sln "Debug|Win32" 
++{$(APPS_DIR)}.c{$(APPS_DIR)\x64\release}.exe:
++	@if not exist $(APPS_OUT) $(MKDIR) $(APPS_OUT)
++	$(CC64) $(REL) -Fe$@ -Fd"$(APPS_OUT)\vc80.pdb" \
++	$< -link -LIBPATH:$(DBLIB_OUT) db-lib.lib $(MSLIBS)
+ 
+-# DebugST\BcpStreams.lib
+-# Release\BcpStreams.lib
+-# x64\Debug\BcpStreams.lib
+-# x64\Release\BcpStreams.lib
+\ No newline at end of file