]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/db.h
update from James Bishop
[wxWidgets.git] / include / wx / db.h
index 070fdce3303cf698c6c7bada98a82e8d6845dab4..fe4d25b0452e04d660ac0fdf806b5442b1a0c01b 100644 (file)
@@ -123,8 +123,8 @@ enum enumDummy {enumDum1};
 
 const int wxDB_PATH_MAX                 = 254;
 
-WXDLLIMPEXP_DATA_ODBC(extern wxChar const *) SQL_LOG_FILENAME;
-WXDLLIMPEXP_DATA_ODBC(extern wxChar const *) SQL_CATALOG_FILENAME;
+extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_LOG_FILENAME;
+extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_CATALOG_FILENAME;
 
 // Database Globals
 const int DB_TYPE_NAME_LEN            = 40;
@@ -473,8 +473,8 @@ enum wxDBMS
 // will overwrite the errors of the previously destroyed wxDb object in
 // this variable.
 
-WXDLLIMPEXP_DATA_ODBC(extern wxChar)
-    DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
+extern WXDLLIMPEXP_DATA_ODBC(wxChar)
+    DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
 
 
 class WXDLLIMPEXP_ODBC wxDb
@@ -589,7 +589,13 @@ public:
     // ODBC Error Inf.
     SWORD  cbErrorMsg;
     int    DB_STATUS;
+#ifdef __VMS
+   // The DECC compiler chokes when in db.cpp the array is accessed outside
+   // its bounds. Maybe this change should also applied for other platforms.
+    wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
+#else
     wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
+#endif
     wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH];
     SDWORD nativeError;
     wxChar sqlState[20];