This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new fd0c352144 [fix](thirdparty) patch sqltypes.h in odbc to avoid
conflict with clucene macro TCHAR (#15926)
fd0c352144 is described below
commit fd0c35214431abd1eae78cf99799e974db227b09
Author: YueW <[email protected]>
AuthorDate: Sun Jan 15 10:10:00 2023 +0800
[fix](thirdparty) patch sqltypes.h in odbc to avoid conflict with clucene
macro TCHAR (#15926)
Fix conflit name TCHAR in odbc sqltypes.h and clucene clucene-config.h.
Change TCHAR to TWCHAR in odbc sqltypes.h, because TCHAR in odbc is not
found used in doris,
but there are too many places to call clucene's TCHAR.
thirdparty/installed/include/sqltypes.h:
`typedef char TCHAR;`
thirdparty/installed/include/CLucene/clucene-config.h:
`typedef wchar_t TCHAR;`
---
thirdparty/download-thirdparty.sh | 9 +++++++++
thirdparty/patches/sqltypes.h.patch | 28 ++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index 6a2e99011f..b2d2555276 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -286,6 +286,15 @@ fi
cd -
echo "Finished patching ${CYRUS_SASL_SOURCE}"
+#patch sqltypes.h, change TCAHR to TWCHAR to avoid conflict with clucene TCAHR
+cd "${TP_SOURCE_DIR}/${ODBC_SOURCE}"
+if [[ ! -f ${PATCHED_MARK} ]]; then
+ patch -p1 <"${TP_PATCH_DIR}/sqltypes.h.patch"
+ touch "${PATCHED_MARK}"
+fi
+cd -
+echo "Finished patching ${ODBC_SOURCE}"
+
# rocksdb patch to fix compile error
if [[ "${ROCKSDB_SOURCE}" == "rocksdb-5.14.2" ]]; then
cd "${TP_SOURCE_DIR}/${ROCKSDB_SOURCE}"
diff --git a/thirdparty/patches/sqltypes.h.patch
b/thirdparty/patches/sqltypes.h.patch
new file mode 100644
index 0000000000..ad0a98084e
--- /dev/null
+++ b/thirdparty/patches/sqltypes.h.patch
@@ -0,0 +1,28 @@
+--- a/include/sqltypes.h 2022-04-19 14:37:42.584467011 +0800
++++ b/include/sqltypes.h 2022-04-19 13:56:41.486446873 +0800
+@@ -82,13 +82,13 @@
+ * by the standard linux string header files.
+ */
+ #ifdef SQL_WCHART_CONVERT
+-typedef wchar_t TCHAR;
++typedef wchar_t TWCHAR;
+ #else
+-typedef signed short TCHAR;
++typedef signed short TWCHAR;
+ #endif
+
+ #else
+-typedef char TCHAR;
++typedef char TWCHAR;
+ #endif
+
+ typedef unsigned short WORD;
+@@ -108,7 +108,7 @@
+ typedef WCHAR* LPWSTR;
+ typedef const char* LPCSTR;
+ typedef const WCHAR* LPCWSTR;
+-typedef TCHAR* LPTSTR;
++typedef TWCHAR* LPTSTR;
+ typedef char* LPSTR;
+ typedef DWORD* LPDWORD;
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]