From 60d915b23dbea2e6acc29effc1a747e95633bfbe Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sun, 23 Feb 2025 15:46:01 -0800 Subject: [PATCH 1/5] Deprecate the old ODBC 3.5 modules in core.sys.windows. --- druntime/src/core/sys/windows/sql.d | 2 ++ druntime/src/core/sys/windows/sqlext.d | 2 ++ druntime/src/core/sys/windows/sqltypes.d | 2 ++ druntime/src/core/sys/windows/sqlucode.d | 2 ++ 4 files changed, 8 insertions(+) diff --git a/druntime/src/core/sys/windows/sql.d b/druntime/src/core/sys/windows/sql.d index 9054ce589e86..7ffcc8614170 100644 --- a/druntime/src/core/sys/windows/sql.d +++ b/druntime/src/core/sys/windows/sql.d @@ -11,6 +11,8 @@ $(RED Warning: */ module core.sys.windows.sql; +deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); +deprecated: version (Windows): public import core.sys.windows.sqltypes; diff --git a/druntime/src/core/sys/windows/sqlext.d b/druntime/src/core/sys/windows/sqlext.d index b871fbbbb841..12e9d05d685c 100644 --- a/druntime/src/core/sys/windows/sqlext.d +++ b/druntime/src/core/sys/windows/sqlext.d @@ -11,6 +11,8 @@ $(RED Warning: */ module core.sys.windows.sqlext; +deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); +deprecated: version (Windows): /* Conversion notes: diff --git a/druntime/src/core/sys/windows/sqltypes.d b/druntime/src/core/sys/windows/sqltypes.d index 04fac6bac6ae..1d198dba9f10 100644 --- a/druntime/src/core/sys/windows/sqltypes.d +++ b/druntime/src/core/sys/windows/sqltypes.d @@ -11,6 +11,8 @@ $(RED Warning: */ module core.sys.windows.sqltypes; +deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); +deprecated: version (Windows): version (ANSI) {} else version = Unicode; diff --git a/druntime/src/core/sys/windows/sqlucode.d b/druntime/src/core/sys/windows/sqlucode.d index e7ae1d276be8..67a92bee606e 100644 --- a/druntime/src/core/sys/windows/sqlucode.d +++ b/druntime/src/core/sys/windows/sqlucode.d @@ -11,6 +11,8 @@ $(RED Warning: */ module core.sys.windows.sqlucode; +deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); +deprecated: version (Windows): version (ANSI) {} else version = Unicode; From b76d185fa1eea2438f29438e384f2b377b83adb0 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sun, 23 Feb 2025 16:03:26 -0800 Subject: [PATCH 2/5] Fix deprecation message. --- druntime/src/core/sys/windows/sql.d | 3 +-- druntime/src/core/sys/windows/sqlext.d | 3 +-- druntime/src/core/sys/windows/sqltypes.d | 3 +-- druntime/src/core/sys/windows/sqlucode.d | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/druntime/src/core/sys/windows/sql.d b/druntime/src/core/sys/windows/sql.d index 7ffcc8614170..fea6b38915b7 100644 --- a/druntime/src/core/sys/windows/sql.d +++ b/druntime/src/core/sys/windows/sql.d @@ -10,9 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sql.d) */ +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sql; -deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); -deprecated: version (Windows): public import core.sys.windows.sqltypes; diff --git a/druntime/src/core/sys/windows/sqlext.d b/druntime/src/core/sys/windows/sqlext.d index 12e9d05d685c..a41d7a25bb97 100644 --- a/druntime/src/core/sys/windows/sqlext.d +++ b/druntime/src/core/sys/windows/sqlext.d @@ -10,9 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqlext.d) */ +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqlext; -deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); -deprecated: version (Windows): /* Conversion notes: diff --git a/druntime/src/core/sys/windows/sqltypes.d b/druntime/src/core/sys/windows/sqltypes.d index 1d198dba9f10..6cb4b18f4a5b 100644 --- a/druntime/src/core/sys/windows/sqltypes.d +++ b/druntime/src/core/sys/windows/sqltypes.d @@ -10,9 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqltypes.d) */ +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqltypes; -deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); -deprecated: version (Windows): version (ANSI) {} else version = Unicode; diff --git a/druntime/src/core/sys/windows/sqlucode.d b/druntime/src/core/sys/windows/sqlucode.d index 67a92bee606e..095bf8986c35 100644 --- a/druntime/src/core/sys/windows/sqlucode.d +++ b/druntime/src/core/sys/windows/sqlucode.d @@ -10,9 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqlucode.d) */ +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqlucode; -deprecated("The ODBC 3.5 modules are deprecated. Please use the ODBC4 module in the etc.c.odbc package."); -deprecated: version (Windows): version (ANSI) {} else version = Unicode; From a9b688f2fdade14b293e30dd507ff0efe4b8bd75 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sun, 23 Feb 2025 16:20:53 -0800 Subject: [PATCH 3/5] Fix deprecation message. --- druntime/src/core/sys/windows/sql.d | 2 +- druntime/src/core/sys/windows/sqlext.d | 2 +- druntime/src/core/sys/windows/sqltypes.d | 2 +- druntime/src/core/sys/windows/sqlucode.d | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/druntime/src/core/sys/windows/sql.d b/druntime/src/core/sys/windows/sql.d index fea6b38915b7..03272e9ea953 100644 --- a/druntime/src/core/sys/windows/sql.d +++ b/druntime/src/core/sys/windows/sql.d @@ -10,8 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sql.d) */ -deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sql; +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): public import core.sys.windows.sqltypes; diff --git a/druntime/src/core/sys/windows/sqlext.d b/druntime/src/core/sys/windows/sqlext.d index a41d7a25bb97..a53918394dc4 100644 --- a/druntime/src/core/sys/windows/sqlext.d +++ b/druntime/src/core/sys/windows/sqlext.d @@ -10,8 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqlext.d) */ -deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqlext; +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): /* Conversion notes: diff --git a/druntime/src/core/sys/windows/sqltypes.d b/druntime/src/core/sys/windows/sqltypes.d index 6cb4b18f4a5b..9aa03d191235 100644 --- a/druntime/src/core/sys/windows/sqltypes.d +++ b/druntime/src/core/sys/windows/sqltypes.d @@ -10,8 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqltypes.d) */ -deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqltypes; +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): version (ANSI) {} else version = Unicode; diff --git a/druntime/src/core/sys/windows/sqlucode.d b/druntime/src/core/sys/windows/sqlucode.d index 095bf8986c35..d20952d5b4b4 100644 --- a/druntime/src/core/sys/windows/sqlucode.d +++ b/druntime/src/core/sys/windows/sqlucode.d @@ -10,8 +10,8 @@ $(RED Warning: * Source: $(DRUNTIMESRC core/sys/windows/_sqlucode.d) */ -deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package.") module core.sys.windows.sqlucode; +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): version (ANSI) {} else version = Unicode; From d1d6c60a124d780b02debd5f74295efd75d9e387 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sun, 23 Feb 2025 16:32:28 -0800 Subject: [PATCH 4/5] Move ODBVER outside of deprecation block. --- druntime/src/core/sys/windows/sql.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/druntime/src/core/sys/windows/sql.d b/druntime/src/core/sys/windows/sql.d index 03272e9ea953..013d9f06e604 100644 --- a/druntime/src/core/sys/windows/sql.d +++ b/druntime/src/core/sys/windows/sql.d @@ -11,14 +11,15 @@ $(RED Warning: */ module core.sys.windows.sql; + +enum ODBCVER = 0x0400; + deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): public import core.sys.windows.sqltypes; import core.sys.windows.windef; -enum ODBCVER = 0x0351; - enum SQL_ACCESSIBLE_PROCEDURES=20; enum SQL_ACCESSIBLE_TABLES=19; enum SQL_ALL_TYPES=0; From a0581f2538d4ea2d5f505f4b5d4259256ddac3c9 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sun, 23 Feb 2025 16:58:46 -0800 Subject: [PATCH 5/5] Fix deprecation message. --- druntime/src/core/sys/windows/sqltypes.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/druntime/src/core/sys/windows/sqltypes.d b/druntime/src/core/sys/windows/sqltypes.d index 9aa03d191235..ca91f0158511 100644 --- a/druntime/src/core/sys/windows/sqltypes.d +++ b/druntime/src/core/sys/windows/sqltypes.d @@ -11,7 +11,6 @@ $(RED Warning: */ module core.sys.windows.sqltypes; -deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): version (Windows): version (ANSI) {} else version = Unicode; @@ -71,6 +70,10 @@ alias long ODBCINT64, SQLBIGINT; alias ulong SQLUBIGINT; //} +//Everything above this line may by used by odbcinst.d +//Everything below this line is deprecated +deprecated ("The ODBC 3.5 modules are deprecated. Please use the ODBC4 modules in the `etc.c.odbc` package."): + struct DATE_STRUCT { SQLSMALLINT year; SQLUSMALLINT month;