9191// is a vital if mediasdk wont use
9292#define DISPATCHER_LOG_HEAP_SINGLETONES
9393
94- #if defined(_WIN32) || defined(_WIN64)
94+ #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
9595// guid for all dispatcher events
9696#define DISPATCHER_LOG_EVENT_GUID L" {EB0538CC-4FEE-484d-ACEE-1182E9F37A57}"
9797
102102// #define DISPATCHER_LOG_REGISTER_FILE_WRITER
103103#define DISPACTHER_LOG_FW_PATH " c:\\ dispatcher.log"
104104
105- #endif // #if defined(_WIN32) || defined(_WIN64)
105+ #endif // #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
106106
107107#include < stdio.h>
108108#include < stdarg.h>
@@ -115,7 +115,7 @@ class IMsgHandler
115115 virtual void Write (int level, int opcode, const char * msg, va_list argptr) = 0;
116116};
117117
118- #if defined(_WIN32) || defined(_WIN64)
118+ #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
119119#if DISPATCHER_LOG_USE_FORMATING
120120
121121 #define DISPATCHER_LOG (lvl, opcode, str )\
@@ -237,7 +237,7 @@ struct DispatchLogBlockHelper
237237};
238238
239239// ----utility sinks-----
240- #if defined(_WIN32) || defined(_WIN64)
240+ #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
241241#if defined(DISPATCHER_LOG_REGISTER_EVENT_PROVIDER)
242242class ETWHandlerFactory
243243 : public DSSingleTone<ETWHandlerFactory>
@@ -254,7 +254,7 @@ class ETWHandlerFactory
254254 ETWHandlerFactory (){}
255255};
256256#endif
257- #endif // #if defined(_WIN32) || defined(_WIN64)
257+ #endif // #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
258258
259259#if defined(DISPATCHER_LOG_REGISTER_FILE_WRITER)
260260class FileSink
@@ -273,7 +273,7 @@ class FileSink
273273 FILE * m_hdl;
274274 FileSink (const std::string & log_file)
275275 {
276- #if defined(_WIN32) || defined(_WIN64)
276+ #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
277277 fopen_s (&m_hdl, log_file.c_str (), " a" );
278278#else
279279 m_hdl = fopen (log_file.c_str (), " a" );
0 commit comments