From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Sun, 27 Oct 2024 21:01:11 +0100
Subject: fix: rename sqlite win32 exports to avoid conflicts with Node.js

As of https://github.com/nodejs/node/pull/53752, a number of symbols
exported by SQLite are now exported by Node.js. This change renames
the exported symbols in SQLite to avoid conflicts with Node.js.

This should be upstreamed to SQLite.

diff --git a/amalgamation/rename_exports.h b/amalgamation/rename_exports.h
index 1d45c732431e1031b7431ade967f0cfb66e500ea..be03b5b7e09108ba1e8ad4ff408b013c3ece90e3 100644
--- a/amalgamation/rename_exports.h
+++ b/amalgamation/rename_exports.h
@@ -367,6 +367,15 @@
 #define sqlite3session_patchset chrome_sqlite3session_patchset  // Lines 11680-11684
 #define sqlite3session_patchset_strm chrome_sqlite3session_patchset_strm  // Lines 12946-12950
 #define sqlite3session_table_filter chrome_sqlite3session_table_filter  // Lines 11448-11455
+#define sqlite3_win32_write_debug chrome_sqlite3_win32_write_debug
+#define sqlite3_win32_sleep chrome_sqlite3_win32_sleep
+#define sqlite3_win32_is_nt chrome_sqlite3_win32_is_nt
+#define sqlite3_win32_utf8_to_unicode chrome_sqlite3_win32_utf8_to_unicode
+#define sqlite3_win32_unicode_to_utf8 chrome_sqlite3_win32_unicode_to_utf8
+#define sqlite3_win32_mbcs_to_utf8 chrome_sqlite3_win32_mbcs_to_utf8
+#define sqlite3_win32_utf8_to_mbcs_v2 chrome_sqlite3_win32_utf8_to_mbcs_v2
+#define sqlite3_win32_utf8_to_mbcs chrome_sqlite3_win32_utf8_to_mbcs
+#define sqlite3_win32_mbcs_to_utf8_v2 chrome_sqlite3_win32_mbcs_to_utf8_v2
 
 #endif  // THIRD_PARTY_SQLITE_AMALGAMATION_RENAME_EXPORTS_H_
 
