diff options
author | ghazan <ghazan@miranda.im> | 2021-11-07 20:59:43 +0300 |
---|---|---|
committer | ghazan <ghazan@miranda.im> | 2021-11-07 20:59:43 +0300 |
commit | c4d15687218b92dee1ca5dd4fb1770dd8465338b (patch) | |
tree | 65a65af578ab40cef014ef41243c23a779d4f4f0 /src/mir_core | |
parent | 2d3b4b958926b3ed7d4a5d997121fe91a12f83cc (diff) |
minor fixes for compilation
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/mir_core.cbp | 13 | ||||
-rw-r--r-- | src/mir_core/mir_core.depend | 15 | ||||
-rw-r--r-- | src/mir_core/mir_core.layout | 64 | ||||
-rw-r--r-- | src/mir_core/src/db.cpp | 6 | ||||
-rw-r--r-- | src/mir_core/src/mstring.cpp | 5 |
5 files changed, 84 insertions, 19 deletions
diff --git a/src/mir_core/mir_core.cbp b/src/mir_core/mir_core.cbp index b24f650bb3..36a0e7d4bc 100644 --- a/src/mir_core/mir_core.cbp +++ b/src/mir_core/mir_core.cbp @@ -15,12 +15,8 @@ <Option createDefFile="1" /> <Option createStaticLib="1" /> <Compiler> - <Add option="-m64" /> <Add option="-g" /> </Compiler> - <Linker> - <Add option="-m64" /> - </Linker> </Target> <Target title="Release"> <Option output="../../codeblocks/bin/Release/mir_core" prefix_auto="1" extension_auto="1" /> @@ -33,7 +29,6 @@ <Add option="-fomit-frame-pointer" /> <Add option="-flto" /> <Add option="-Os" /> - <Add option="-std=c++11" /> <Add option="-m64" /> </Compiler> <Linker> @@ -46,10 +41,17 @@ <Compiler> <Add option="-Wfatal-errors" /> <Add option="-Wall" /> + <Add option="-std=gnu++17" /> + <Add option="-m64" /> <Add option="-fexceptions" /> + <Add option="-fpermissive" /> <Add option="-DMIR_CORE_EXPORTS" /> <Add directory="../../include" /> </Compiler> + <Linker> + <Add option="-m64" /> + </Linker> + <Unit filename="src/Linux/fileutil.cpp" /> <Unit filename="src/binbuffer.cpp" /> <Unit filename="src/bitmaps.cpp" /> <Unit filename="src/db.cpp" /> @@ -59,7 +61,6 @@ <Unit filename="src/md5.cpp" /> <Unit filename="src/memory.cpp" /> <Unit filename="src/miranda.h" /> - <Unit filename="src/modules.cpp" /> <Unit filename="src/mstring.cpp" /> <Unit filename="src/sha1.cpp" /> <Unit filename="src/sha256.cpp" /> diff --git a/src/mir_core/mir_core.depend b/src/mir_core/mir_core.depend index bd3a5c7130..968ced0a40 100644 --- a/src/mir_core/mir_core.depend +++ b/src/mir_core/mir_core.depend @@ -47,15 +47,16 @@ <m_core.h> <m_string.h> -1636291943 /var/www/miranda-ng/include/m_core.h +1636305794 /var/www/miranda-ng/include/m_core.h <sal.h> <stdint.h> <stdlib.h> <m_types.h> -1636292217 /var/www/miranda-ng/include/m_types.h +1636305872 /var/www/miranda-ng/include/m_types.h <wchar.h> <netinet/in.h> + <tchar.h> 1636282895 /var/www/miranda-ng/include/m_string.h <stdio.h> @@ -115,13 +116,13 @@ 1634479262 /var/www/miranda-ng/include/m_button.h -1636286799 /var/www/miranda-ng/include/m_gui.h +1636305794 /var/www/miranda-ng/include/m_gui.h <CommCtrl.h> <m_system.h> <m_protoint.h> <m_clc.h> -1636284756 /var/www/miranda-ng/include/m_protoint.h +1636306687 /var/www/miranda-ng/include/m_protoint.h <m_system.h> <m_protosvc.h> <m_database.h> @@ -190,16 +191,16 @@ 1634479263 source:/var/www/miranda-ng/src/mir_core/src/http.cpp "stdafx.h" -1636289767 source:/var/www/miranda-ng/src/mir_core/src/logger.cpp +1636305794 source:/var/www/miranda-ng/src/mir_core/src/logger.cpp "stdafx.h" 1636290658 source:/var/www/miranda-ng/src/mir_core/src/md5.cpp "stdafx.h" -1636290256 source:/var/www/miranda-ng/src/mir_core/src/db.cpp +1636306776 source:/var/www/miranda-ng/src/mir_core/src/db.cpp "stdafx.h" -1636290951 source:/var/www/miranda-ng/src/mir_core/src/mstring.cpp +1636307265 source:/var/www/miranda-ng/src/mir_core/src/mstring.cpp "stdafx.h" 1636290966 source:/var/www/miranda-ng/src/mir_core/src/sha256.cpp diff --git a/src/mir_core/mir_core.layout b/src/mir_core/mir_core.layout index 5ca32c1036..315c0314fc 100644 --- a/src/mir_core/mir_core.layout +++ b/src/mir_core/mir_core.layout @@ -2,9 +2,69 @@ <CodeBlocks_layout_file> <FileVersion major="1" minor="0" /> <ActiveTarget name="Debug" /> - <File name="src/stdafx.h" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/mstring.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1016" topLine="0" /> + <Cursor1 position="4097" topLine="113" /> + </Cursor> + </File> + <File name="src/utf.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="9719" topLine="352" /> + </Cursor> + </File> + <File name="src/db.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="7032" topLine="200" /> + </Cursor> + </File> + <File name="src/utils.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="12325" topLine="538" /> + </Cursor> + </File> + <File name="src/bitmaps.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1138" topLine="22" /> + </Cursor> + </File> + <File name="src/tinyxml2_utils.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="2285" topLine="60" /> + </Cursor> + </File> + <File name="src/stdafx.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1437" topLine="26" /> + </Cursor> + </File> + <File name="src/miranda.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="2513" topLine="66" /> + </Cursor> + </File> + <File name="src/sha256.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="6752" topLine="241" /> + </Cursor> + </File> + <File name="src/memory.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="7542" topLine="267" /> + </Cursor> + </File> + <File name="src/logger.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="974" topLine="0" /> + </Cursor> + </File> + <File name="src/md5.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="10636" topLine="277" /> + </Cursor> + </File> + <File name="src/Linux/fileutil.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="798" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp index 11d28cf84a..3f91edac6f 100644 --- a/src/mir_core/src/db.cpp +++ b/src/mir_core/src/db.cpp @@ -63,7 +63,7 @@ MIR_CORE_DLL(MCONTACT) db_add_contact(void) MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact) { ptrW wszPhoto(db_get_wsa(hContact, "ContactPhoto", "File")); - if (wszPhoto != NULL) { + if (wszPhoto != nullptr) { #ifdef _MSC_VER DeleteFileW(wszPhoto); #else @@ -505,12 +505,12 @@ MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT hContact) MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto) { - return (g_pCurrDb == nullptr) ? NULL : g_pCurrDb->FindFirstContact(szProto); + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstContact(szProto); } MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto) { - return (g_pCurrDb == nullptr) ? NULL : g_pCurrDb->FindNextContact(hContact, szProto); + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindNextContact(hContact, szProto); } MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db) diff --git a/src/mir_core/src/mstring.cpp b/src/mir_core/src/mstring.cpp index 4be44f6e06..71cdd5f169 100644 --- a/src/mir_core/src/mstring.cpp +++ b/src/mir_core/src/mstring.cpp @@ -123,7 +123,11 @@ MIR_CORE_DLL(void) mirstr_unlock(CMStringData* pThis) // don't remove it // this code just instantiates templates for CMStringW[A/W] +#ifdef _MSC_VER template MIR_CORE_EXPORT CMStringW; +template MIR_CORE_EXPORT CMStringA; +#endif + template MIR_CORE_EXPORT CMStringW CALLBACK operator+(const CMStringW& str1, const CMStringW& str2); template MIR_CORE_EXPORT CMStringW CALLBACK operator+(const CMStringW& str1, const wchar_t *psz2); template MIR_CORE_EXPORT CMStringW CALLBACK operator+(const wchar_t *psz1, const CMStringW& str2); @@ -132,7 +136,6 @@ template MIR_CORE_EXPORT CMStringW CALLBACK operator+(const CMStringW& str1, cha template MIR_CORE_EXPORT CMStringW CALLBACK operator+(wchar_t ch1, const CMStringW& str2); template MIR_CORE_EXPORT CMStringW CALLBACK operator+(char ch1, const CMStringW& str2); -template MIR_CORE_EXPORT CMStringA; template MIR_CORE_EXPORT CMStringA CALLBACK operator+(const CMStringA& str1, const CMStringA& str2); template MIR_CORE_EXPORT CMStringA CALLBACK operator+(const CMStringA& str1, const char *psz2); template MIR_CORE_EXPORT CMStringA CALLBACK operator+(const char *psz1, const CMStringA& str2); |