From 0e3db0eb1dfe2cb30a14f0198fb5aa22f00a4b26 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 15 Feb 2010 04:47:05 +0300 Subject: gcc(mingw) compilation fix --- stopspam_mod/Makefile | 6 +++--- stopspam_mod/headers.h | 4 +++- stopspam_mod/init.cpp | 3 ++- stopspam_mod/stopspam.aps | Bin 40396 -> 0 bytes stopspam_mod/stopspam.cpp | 2 +- stopspam_mod/utilities.cpp | 2 +- stopspam_mod/utilities.h | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 stopspam_mod/stopspam.aps diff --git a/stopspam_mod/Makefile b/stopspam_mod/Makefile index fda598f..6eb5adf 100644 --- a/stopspam_mod/Makefile +++ b/stopspam_mod/Makefile @@ -1,7 +1,7 @@ all: - i686-pc-mingw32-g++ -c -DBUILD_DLL *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -w -march=i686 -msse -O2 -pipe + i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -w -march=i686 -msse -O2 -pipe i686-pc-mingw32-windres -i stopspam.rc -o resources.o - i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s + i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s -lstdc++ upx -9 stopspam.dll clean: @@ -9,4 +9,4 @@ clean: clean-all: rm *.o *.dll - \ No newline at end of file + diff --git a/stopspam_mod/headers.h b/stopspam_mod/headers.h index 952a392..8295bc4 100644 --- a/stopspam_mod/headers.h +++ b/stopspam_mod/headers.h @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -25,4 +27,4 @@ #include "resource.h" #include "utilities.h" -#include \ No newline at end of file +#include diff --git a/stopspam_mod/init.cpp b/stopspam_mod/init.cpp index 2e7b114..ab1bf4f 100644 --- a/stopspam_mod/init.cpp +++ b/stopspam_mod/init.cpp @@ -119,6 +119,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfoEx; } +extern tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue); void InitVars() { @@ -206,4 +207,4 @@ extern "C" int __declspec(dllexport) Unload(void) { miranda::EventHooker::UnhookAll(); return 0; -} \ No newline at end of file +} diff --git a/stopspam_mod/stopspam.aps b/stopspam_mod/stopspam.aps deleted file mode 100644 index 54b6850..0000000 Binary files a/stopspam_mod/stopspam.aps and /dev/null differ diff --git a/stopspam_mod/stopspam.cpp b/stopspam_mod/stopspam.cpp index e3cdae7..a0c821b 100644 --- a/stopspam_mod/stopspam.cpp +++ b/stopspam_mod/stopspam.cpp @@ -174,7 +174,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) msg = 0; //is it useful ? } - if(gbCaseInsensitive?(!stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str())))) + if(gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str())))) { // unhide contact DBDeleteContactSetting(hContact, "CList", "Hidden"); diff --git a/stopspam_mod/utilities.cpp b/stopspam_mod/utilities.cpp index 7b95337..c481b85 100644 --- a/stopspam_mod/utilities.cpp +++ b/stopspam_mod/utilities.cpp @@ -147,7 +147,7 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ // case-insensitive _tcsstr //by nullbie as i remember... #define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A) -const int stricmp(const TCHAR *str, const TCHAR *substr) +const int Stricmp(const TCHAR *str, const TCHAR *substr) { TCHAR *str_up = NEWTSTR_ALLOCA(str); TCHAR *substr_up = NEWTSTR_ALLOCA(substr); diff --git a/stopspam_mod/utilities.h b/stopspam_mod/utilities.h index 48c3834..c913491 100644 --- a/stopspam_mod/utilities.h +++ b/stopspam_mod/utilities.h @@ -5,4 +5,4 @@ std::string &GetProtoList(); bool ProtoInList(std::string proto); void RemoveExcludedUsers(); tstring variables_parse(tstring const &tstrFormat, HANDLE hContact); -const int stricmp(const TCHAR *str, const TCHAR *substr); \ No newline at end of file +const int Stricmp(const TCHAR *str, const TCHAR *substr); -- cgit v1.2.3