From 81704b90700bf997c8ab6164ea610602e886040e Mon Sep 17 00:00:00 2001
From: Byron Nikolaidis <byronn@insightdist.com>
Date: Mon, 28 Feb 2000 03:31:36 +0000
Subject: [PATCH] update to 6.40.0009 and provide WIN32 defines for
 auto-configured items such as BLCKSZ and MAXPGPATHLEN?

---
 src/interfaces/odbc/psqlodbc.h  |  8 ++++++--
 src/interfaces/odbc/psqlodbc.rc | 12 ++++++------
 src/interfaces/odbc/setup.c     |  4 ++++
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/interfaces/odbc/psqlodbc.h b/src/interfaces/odbc/psqlodbc.h
index 7e9493b90f6..53221050ab1 100644
--- a/src/interfaces/odbc/psqlodbc.h
+++ b/src/interfaces/odbc/psqlodbc.h
@@ -40,8 +40,8 @@ typedef UInt4 Oid;
 #define DRIVERNAME             "PostgreSQL ODBC"
 #define DBMS_NAME              "PostgreSQL"
 
-#define DBMS_VERSION           "06.40.0008 PostgreSQL 6.4/6.5"
-#define POSTGRESDRIVERVERSION  "06.40.0008"
+#define DBMS_VERSION           "06.40.0009 PostgreSQL 6.4/6.5"
+#define POSTGRESDRIVERVERSION  "06.40.0009"
 
 #ifdef WIN32
 #define DRIVER_FILE_NAME		"PSQLODBC.DLL"
@@ -50,6 +50,10 @@ typedef UInt4 Oid;
 #endif
 
 /* Limits */
+#ifdef WIN32
+#define BLCKSZ                      4096
+#endif
+
 #define MAX_QUERY_SIZE				(BLCKSZ*2)
 #define MAX_MESSAGE_LEN				MAX_QUERY_SIZE
 #define MAX_CONNECT_STRING			4096
diff --git a/src/interfaces/odbc/psqlodbc.rc b/src/interfaces/odbc/psqlodbc.rc
index 518bc27ba7b..401661c1d64 100644
--- a/src/interfaces/odbc/psqlodbc.rc
+++ b/src/interfaces/odbc/psqlodbc.rc
@@ -145,8 +145,8 @@ BEGIN
     CONTROL         "Show System &Tables",DS_SHOWSYSTEMTABLES,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,25,25,85,10
     GROUPBOX        "Protocol",IDC_STATIC,15,40,180,25
-    CONTROL         "6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS_GROUP,25,
-                    50,26,10
+    CONTROL         "6.5/6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS_GROUP,
+                    25,50,35,10
     CONTROL         "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
                     75,50,26,10
     CONTROL         "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
@@ -204,8 +204,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,40,0,6
- PRODUCTVERSION 6,40,0,6
+ FILEVERSION 6,40,0,9
+ PRODUCTVERSION 6,40,0,9
  FILEFLAGSMASK 0x3L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -223,12 +223,12 @@ BEGIN
             VALUE "Comments", "PostgreSQL ODBC driver for Windows 95\0"
             VALUE "CompanyName", "Insight Distribution Systems\0"
             VALUE "FileDescription", "PostgreSQL Driver\0"
-            VALUE "FileVersion", " 6.40.0006\0"
+            VALUE "FileVersion", " 6.40.0009\0"
             VALUE "InternalName", "psqlodbc\0"
             VALUE "LegalTrademarks", "ODBC(TM) is a trademark of Microsoft Corporation.  Microsoft� is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation.\0"
             VALUE "OriginalFilename", "psqlodbc.dll\0"
             VALUE "ProductName", "Microsoft Open Database Connectivity\0"
-            VALUE "ProductVersion", " 6.40.0006\0"
+            VALUE "ProductVersion", " 6.40.0009\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/interfaces/odbc/setup.c b/src/interfaces/odbc/setup.c
index 40816fd1100..5dd816980b8 100644
--- a/src/interfaces/odbc/setup.c
+++ b/src/interfaces/odbc/setup.c
@@ -32,6 +32,10 @@ extern GLOBAL_VALUES globals;
 // Constants ---------------------------------------------------------------
 #define MIN(x,y)      ((x) < (y) ? (x) : (y))
 
+#ifdef WIN32
+#define MAXPGPATH       (255+1)
+#endif
+
 #define MAXKEYLEN       (15+1)            // Max keyword length
 #define MAXDESC         (255+1)           // Max description length
 #define MAXDSNAME       (32+1)            // Max data source name length
-- 
GitLab