From 7015c3798dedebd39ab1443c38ba126cffb64307 Mon Sep 17 00:00:00 2001 From: paulc Date: Fri, 8 Jul 2005 14:51:06 +0000 Subject: [PATCH] Made h323 and gtk2 build on Windows. git-svn-id: http://yate.null.ro/svn/yate/trunk@438 acf43c95-373e-0410-b603-e72c3f656dc1 --- clients/main-gtk2.cpp | 4 +- modules/dsoundchan.cpp | 45 +++++++++++++++- modules/h323chan.cpp | 28 ++++++++-- windows/Extra.dsp | 63 ++++++++++++++++++++++ windows/Gtk2Client.dsp | 114 +++++++++++++++++++++++++++++++++++++++ windows/LibGtk2.dsp | 118 +++++++++++++++++++++++++++++++++++++++++ windows/YATE.dsw | 51 ++++++++++++++++++ windows/_h323chan.dsp | 4 +- windows/ver+icon.rc | 3 ++ yateclass.h | 5 +- 10 files changed, 426 insertions(+), 9 deletions(-) create mode 100644 windows/Extra.dsp create mode 100644 windows/Gtk2Client.dsp create mode 100644 windows/LibGtk2.dsp create mode 100644 windows/ver+icon.rc diff --git a/clients/main-gtk2.cpp b/clients/main-gtk2.cpp index 4f1b6639..fd0490ce 100644 --- a/clients/main-gtk2.cpp +++ b/clients/main-gtk2.cpp @@ -30,7 +30,7 @@ using namespace TelEngine; static GTKDriver gtkdriver; -extern "C" int main(int argc, const char** argv, const char** environ) +extern "C" int main(int argc, const char** argv, const char** envp) { g_thread_init(NULL); gdk_threads_init(); @@ -38,6 +38,6 @@ extern "C" int main(int argc, const char** argv, const char** environ) if (fail) g_warning("Cannot open display: '%s'",gdk_get_display()); TelEngine::Engine::extraPath() = "gtk2"; - return TelEngine::Engine::main(argc,argv,environ,TelEngine::Engine::Client,fail); + return TelEngine::Engine::main(argc,argv,envp,TelEngine::Engine::Client,fail); } /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/dsoundchan.cpp b/modules/dsoundchan.cpp index 546ec26a..a6662c9b 100644 --- a/modules/dsoundchan.cpp +++ b/modules/dsoundchan.cpp @@ -445,7 +445,50 @@ DSoundChan::~DSoundChan() bool AttachHandler::received(Message &msg) { - return false; + int more = 2; + + String src(msg.getValue("source")); + if (src.null()) + more--; + else if (!src.startSkip("dsound/",false)) + src = ""; + + String cons(msg.getValue("consumer")); + if (cons.null()) + more--; + else if (!cons.startSkip("dsound/",false)) + cons = ""; + + if (src.null() && cons.null()) + return false; + + DataEndpoint *dd = static_cast(msg.userObject("DataEndpoint")); + if (!dd) { + CallEndpoint *ch = static_cast(msg.userObject("CallEndpoint")); + if (ch) + dd = ch->setEndpoint(); + } + if (!dd) { + Debug(DebugWarn,"DSound attach request with no control or data channel!"); + return false; + } + + if (src) { + DSoundSource* s = new DSoundSource; + dd->setSource(s); + s->deref(); + } + + if (cons) { + DSoundConsumer* c = new DSoundConsumer; + dd->setConsumer(c); + c->deref(); + } + + Thread::msleep(50); + + // Stop dispatching if we handled all requested + return !more; } bool SoundDriver::msgExecute(Message& msg, String& dest) diff --git a/modules/h323chan.cpp b/modules/h323chan.cpp index 6a98a4dc..bb1eb011 100644 --- a/modules/h323chan.cpp +++ b/modules/h323chan.cpp @@ -35,6 +35,28 @@ #include #include +/* For some reason the Windows version of OpenH323 #undefs the version. + * You need to put a openh323version.h file somewhere in your include path, + * preferably in the OpenH323 include directory. + * Make sure you keep that file in sync with your other OpenH323 components. + * You can find a template for that below: + +--- cut here --- +#ifndef OPENH323_MAJOR + +#define OPENH323_MAJOR 1 +#define OPENH323_MINOR 0 +#define OPENH323_BUILD 0 + +#endif +--- cut here --- + + */ + +#ifdef _WINDOWS +#include +#endif + #ifndef OPENH323_VERSION #define OPENH323_VERSION "SomethingOld" #endif @@ -506,7 +528,7 @@ public: return FALSE; const H245_AudioCapability_g7231& g7231 = pdu; packetSize = g7231.m_maxAl_sduAudioFrames; - m_aa = g7231.m_silenceSuppression; + m_aa = (g7231.m_silenceSuppression != 0); return TRUE; } protected: @@ -825,7 +847,7 @@ YateH323Connection::YateH323Connection(YateH323EndPoint& endpoint, // outgoing calls get the "call.execute" message as user data Message* msg = static_cast(userdata); - m_chan = new YateH323Chan(this,userdata, + m_chan = new YateH323Chan(this,(userdata != 0), ((transport && !userdata) ? (const char*)transport->GetRemoteAddress() : 0)); if (!msg) { m_passtrough = s_passtrough; @@ -1188,7 +1210,7 @@ BOOL YateH323Connection::decodeCapability(const H323Capability& capability, cons break; } } - DDebug(m_chan,DebugAll,"capability '%s' format '%s' payload %d",fname.c_str(),format,pload); + DDebug(&hplugin,DebugAll,"capability '%s' format '%s' payload %d",fname.c_str(),format,pload); if (format) { if (capabName) *capabName = fname; diff --git a/windows/Extra.dsp b/windows/Extra.dsp new file mode 100644 index 00000000..b3d80d1d --- /dev/null +++ b/windows/Extra.dsp @@ -0,0 +1,63 @@ +# Microsoft Developer Studio Project File - Name="Extra" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Generic Project" 0x010a + +CFG=Extra - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Extra.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Extra.mak" CFG="Extra - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Extra - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "Extra - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +MTL=midl.exe + +!IF "$(CFG)" == "Extra - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "Extra - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "Extra - Win32 Release" +# Name "Extra - Win32 Debug" +# End Target +# End Project diff --git a/windows/Gtk2Client.dsp b/windows/Gtk2Client.dsp new file mode 100644 index 00000000..562e911f --- /dev/null +++ b/windows/Gtk2Client.dsp @@ -0,0 +1,114 @@ +# Microsoft Developer Studio Project File - Name="Gtk2Client" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Gtk2Client - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Gtk2Client.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Gtk2Client.mak" CFG="Gtk2Client - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Gtk2Client - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Gtk2Client - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Gtk2Client - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /O2 /I "." /I ".." /I "../contrib/gtk2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib gtk-win32-2.0.lib gdk-win32-2.0.lib glib-2.0.lib gthread-2.0.lib /nologo /entry:"mainCRTStartup" /subsystem:windows /machine:I386 /out:"Release/yate-gtk2.exe" +# SUBTRACT LINK32 /incremental:yes + +!ELSEIF "$(CFG)" == "Gtk2Client - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /Zi /Od /I "." /I ".." /I "../contrib/gtk2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib gtk-win32-2.0.lib gdk-win32-2.0.lib glib-2.0.lib gthread-2.0.lib /nologo /entry:"mainCRTStartup" /subsystem:windows /incremental:no /debug /machine:I386 /out:"Debug/yate-gtk2.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "Gtk2Client - Win32 Release" +# Name "Gtk2Client - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\clients\main-gtk2.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\ver+icon.rc" +# End Source File +# End Group +# End Target +# End Project diff --git a/windows/LibGtk2.dsp b/windows/LibGtk2.dsp new file mode 100644 index 00000000..26c0e7ce --- /dev/null +++ b/windows/LibGtk2.dsp @@ -0,0 +1,118 @@ +# Microsoft Developer Studio Project File - Name="LibGtk2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=LibGtk2 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "LibGtk2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "LibGtk2.mak" CFG="LibGtk2 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LibGtk2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "LibGtk2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "LibGtk2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGTK2_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX- /O2 /I "." /I ".." /I "../contrib/gtk2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBYGTK2_EXPORTS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib gtk-win32-2.0.lib gdk-win32-2.0.lib gobject-2.0.lib glib-2.0.lib /nologo /dll /machine:I386 /out:"Release/Libygtk2.dll" +# SUBTRACT LINK32 /incremental:yes + +!ELSEIF "$(CFG)" == "LibGtk2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGTK2_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX- /ZI /Od /I "." /I ".." /I "../contrib/gtk2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBYGTK2_EXPORTS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib gtk-win32-2.0.lib gdk-win32-2.0.lib gobject-2.0.lib glib-2.0.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"Debug/Libygtk2.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "LibGtk2 - Win32 Release" +# Name "LibGtk2 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\contrib\gtk2\gtk2client.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\contrib\gtk2\gtk2client.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\version.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/windows/YATE.dsw b/windows/YATE.dsw index f73c8778..5dffd1a9 100644 --- a/windows/YATE.dsw +++ b/windows/YATE.dsw @@ -54,6 +54,57 @@ Package=<4> ############################################################################### +Project: "Extra"=.\Extra.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name _h323chan + End Project Dependency + Begin Project Dependency + Project_Dep_Name Gtk2Client + End Project Dependency +}}} + +############################################################################### + +Project: "Gtk2Client"=.\Gtk2Client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name LibGtk2 + End Project Dependency + Begin Project Dependency + Project_Dep_Name Libyate + End Project Dependency +}}} + +############################################################################### + +Project: "LibGtk2"=.\LibGtk2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name Libyate + End Project Dependency +}}} + +############################################################################### + Project: "Libyate"=.\Libyate.dsp - Package Owner=<4> Package=<5> diff --git a/windows/_h323chan.dsp b/windows/_h323chan.dsp index 43e96da2..1b7a98f3 100644 --- a/windows/_h323chan.dsp +++ b/windows/_h323chan.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib /nologo /dll /machine:I386 /out:"Release/h323chan.yate" +# ADD LINK32 kernel32.lib PTLib.lib ptclib.lib OpenH323.lib /nologo /dll /machine:I386 /out:"Release/h323chan.yate" # SUBTRACT LINK32 /incremental:yes !ELSEIF "$(CFG)" == "_h323chan - Win32 Debug" @@ -82,7 +82,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"Debug/h323chan.yate" /pdbtype:sept +# ADD LINK32 kernel32.lib PTLibd.lib ptclibd.lib OpenH323d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"Debug/h323chan.yate" /pdbtype:sept !ENDIF diff --git a/windows/ver+icon.rc b/windows/ver+icon.rc new file mode 100644 index 00000000..4dd3990f --- /dev/null +++ b/windows/ver+icon.rc @@ -0,0 +1,3 @@ +1 ICON DISCARDABLE "null_team.ico" + +#include "version.rc" diff --git a/yateclass.h b/yateclass.h index bdfa3eaa..53b7d70d 100644 --- a/yateclass.h +++ b/yateclass.h @@ -65,9 +65,12 @@ typedef unsigned __int64 uint64_t; typedef int socklen_t; typedef unsigned long in_addr_t; +#ifndef strcasecmp +#define strcasecmp _stricmp +#endif + #define vsnprintf _vsnprintf #define snprintf _snprintf -#define strcasecmp _stricmp #define strdup _strdup #define random rand #define open _open