[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;`
This commit is contained in:
9
thirdparty/download-thirdparty.sh
vendored
9
thirdparty/download-thirdparty.sh
vendored
@ -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}"
|
||||
|
||||
28
thirdparty/patches/sqltypes.h.patch
vendored
Normal file
28
thirdparty/patches/sqltypes.h.patch
vendored
Normal file
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user