Skip to content

Commit 104f1ec

Browse files
cursoragentlovasoa
andcommitted
Add wide character function defines for unixODBC and iODBC
Co-authored-by: contact <contact@ophir.dev>
1 parent 03cbf3b commit 104f1ec

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

build.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,21 @@ fn compile_unixodbc() {
165165
build.define("HAVE_STRERROR", "1");
166166
build.define("HAVE_LOCALTIME_R", "1");
167167

168+
// Wide character functions (C99 standard, in wchar.h)
169+
build.define("HAVE_WCSLEN", "1");
170+
build.define("HAVE_WCSCPY", "1");
171+
build.define("HAVE_WCSCHR", "1");
172+
build.define("HAVE_WCSCAT", "1");
173+
build.define("HAVE_WCSCMP", "1");
174+
build.define("HAVE_TOWLOWER", "1");
175+
build.define("HAVE_WCSNCASECMP", "1");
176+
168177
// Threading and dynamic loading
169178
build.define("HAVE_LIBPTHREAD", "1");
170179
build.define("HAVE_LIBDL", "1");
171180

172-
// Package info
181+
// Package info (not strictly necessary for compilation)
173182
build.define("PACKAGE", "\"unixODBC\"");
174-
build.define("VERSION", "\"2.3.12\"");
175183

176184
// ODBC settings
177185
build.define("ENABLE_UNICODE_SUPPORT", "1");
@@ -298,13 +306,21 @@ fn compile_iodbc() {
298306
build.define("HAVE_STRERROR", "1");
299307
build.define("HAVE_LOCALTIME_R", "1");
300308

309+
// Wide character functions (C99 standard, in wchar.h)
310+
build.define("HAVE_WCSLEN", "1");
311+
build.define("HAVE_WCSCPY", "1");
312+
build.define("HAVE_WCSCHR", "1");
313+
build.define("HAVE_WCSCAT", "1");
314+
build.define("HAVE_WCSCMP", "1");
315+
build.define("HAVE_TOWLOWER", "1");
316+
build.define("HAVE_WCSNCASECMP", "1");
317+
301318
// Threading and dynamic loading
302319
build.define("HAVE_LIBPTHREAD", "1");
303320
build.define("HAVE_LIBDL", "1");
304321

305-
// Package info
322+
// Package info (not strictly necessary for compilation)
306323
build.define("PACKAGE", "\"iODBC\"");
307-
build.define("VERSION", "\"3.52.16\"");
308324

309325
// ODBC settings
310326
build.define("ENABLE_UNICODE_SUPPORT", "1");

0 commit comments

Comments
 (0)