diff --git a/NEWS b/NEWS index 3621d186..ae8b7899 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,9 @@ here. v0.x.x (xxxx-xx-xx) ------------------- -- Cygwin and Mingw are deprecated due to lack of interest. +- Support for Cygwin has been dropped. It was not working for a very long + time and nobody had complained about it. +- Mingw is deprecated due to lack of interest. - Added TRACY_NO_CALLSTACK_INLINES macro to disable inline functions resolution in call stacks on Windows. - Limited client query response rate. diff --git a/TracyVulkan.hpp b/TracyVulkan.hpp index d19cbdee..e7a19ca1 100644 --- a/TracyVulkan.hpp +++ b/TracyVulkan.hpp @@ -69,7 +69,7 @@ public: VkTimeDomainEXT data[4]; _vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physdev, &num, data ); VkTimeDomainEXT supportedDomain = VK_TIME_DOMAIN_MAX_ENUM_EXT; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 supportedDomain = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT; #elif defined __linux__ && defined CLOCK_MONOTONIC_RAW supportedDomain = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT; @@ -155,7 +155,7 @@ public: } m_deviation = minDeviation * 3 / 2; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 m_qpcToNs = int64_t( 1000000000. / GetFrequencyQpc() ); #endif @@ -304,7 +304,7 @@ private: } while( deviation > m_deviation ); -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 tGpu = ts[0]; tCpu = ts[1] * m_qpcToNs; #elif defined __linux__ && defined CLOCK_MONOTONIC_RAW diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index d0abba1f..fabbc12e 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -115,7 +115,7 @@ extern "C" t_SymGetLineFromInlineContext _SymGetLineFromInlineContext = 0; } -#ifndef __CYGWIN__ + struct ModuleCache { uint64_t start; @@ -134,7 +134,7 @@ struct KernelDriver KernelDriver* s_krnlCache = nullptr; size_t s_krnlCacheCnt; -#endif + void InitCallstack() { @@ -152,7 +152,6 @@ void InitCallstack() SymInitialize( GetCurrentProcess(), nullptr, true ); SymSetOptions( SYMOPT_LOAD_LINES ); -#ifndef __CYGWIN__ DWORD needed; LPVOID dev[4096]; if( EnumDeviceDrivers( dev, sizeof(dev), &needed ) != 0 ) @@ -231,7 +230,6 @@ void InitCallstack() } } } -#endif #ifdef TRACY_DBGHELP_LOCK DBGHELP_UNLOCK; @@ -278,7 +276,6 @@ static const char* GetModuleName( uint64_t addr ) { if( ( addr >> 63 ) != 0 ) { -#ifndef __CYGWIN__ if( s_krnlCache ) { auto it = std::lower_bound( s_krnlCache, s_krnlCache + s_krnlCacheCnt, addr, []( const KernelDriver& lhs, const uint64_t& rhs ) { return lhs.addr > rhs; } ); @@ -287,11 +284,9 @@ static const char* GetModuleName( uint64_t addr ) return it->mod; } } -#endif return ""; } -#ifndef __CYGWIN__ for( auto& v : *s_modCache ) { if( addr >= v.start && addr < v.end ) @@ -338,8 +333,6 @@ static const char* GetModuleName( uint64_t addr ) } } } -#endif - return "[unknown]"; } diff --git a/client/TracyCallstack.h b/client/TracyCallstack.h index 87d8ce72..4145421f 100644 --- a/client/TracyCallstack.h +++ b/client/TracyCallstack.h @@ -1,11 +1,11 @@ #ifndef __TRACYCALLSTACK_H__ #define __TRACYCALLSTACK_H__ -#if !defined _WIN32 && !defined __CYGWIN__ +#if !defined _WIN32 # include #endif -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # define TRACY_HAS_CALLSTACK 1 #elif defined __ANDROID__ # if !defined __arm__ || __ANDROID_API__ >= 21 diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index b4973791..80df8548 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -14,12 +14,6 @@ # include #endif -#ifdef __CYGWIN__ -# include -# include -# include -#endif - #ifdef _GNU_SOURCE # include #endif @@ -95,7 +89,7 @@ # endif #endif -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # include extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW ); extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PROCESSOR_RELATIONSHIP, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, PDWORD ); @@ -108,11 +102,11 @@ extern "C" typedef BOOL (WINAPI *t_GetLogicalProcessorInformationEx)( LOGICAL_PR # include #endif -#if !defined _WIN32 && !defined __CYGWIN__ && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) +#if !defined _WIN32 && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) # include #endif -#if !( ( ( defined _WIN32 || defined __CYGWIN__ ) && _WIN32_WINNT >= _WIN32_WINNT_VISTA ) || defined __linux__ ) +#if !( ( defined _WIN32 && _WIN32_WINNT >= _WIN32_WINNT_VISTA ) || defined __linux__ ) # include #endif @@ -142,7 +136,7 @@ struct ThreadHandleWrapper static inline void CpuId( uint32_t* regs, uint32_t leaf ) { memset(regs, 0, sizeof(uint32_t) * 4); -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 __cpuidex( (int*)regs, leaf, 0 ); #else __get_cpuid( leaf, regs, regs+1, regs+2, regs+3 ); @@ -151,7 +145,7 @@ static inline void CpuId( uint32_t* regs, uint32_t leaf ) static void InitFailure( const char* msg ) { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 bool hasConsole = false; bool reopen = false; const auto attached = AttachConsole( ATTACH_PARENT_PROCESS ); @@ -199,7 +193,7 @@ static int64_t SetupHwTimer() const char* noCheck = GetEnvVar( "TRACY_NO_INVARIANT_CHECK" ); if( !noCheck || noCheck[0] != '1' ) { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_QPC or TRACY_TIMER_FALLBACK define to use lower resolution timer." ); #else InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_FALLBACK define to use lower resolution timer." ); @@ -233,7 +227,7 @@ static const char* GetProcessName() auto buf = getprogname(); if( buf ) processName = buf; # endif -#elif defined _GNU_SOURCE || defined __CYGWIN__ +#elif defined _GNU_SOURCE if( program_invocation_short_name ) processName = program_invocation_short_name; #elif defined __APPLE__ || defined BSD auto buf = getprogname(); @@ -250,7 +244,7 @@ static const char* GetProcessExecutablePath() return buf; #elif defined __ANDROID__ return nullptr; -#elif defined _GNU_SOURCE || defined __CYGWIN__ +#elif defined _GNU_SOURCE return program_invocation_name; #elif defined __APPLE__ static char buf[1024]; @@ -304,13 +298,11 @@ static const char* GetHostInfo() { static char buf[1024]; auto ptr = buf; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" ); if( !RtlGetVersion ) { -# ifdef __CYGWIN__ - ptr += sprintf( ptr, "OS: Windows (Cygwin)\n" ); -# elif defined __MINGW32__ +# ifdef __MINGW32__ ptr += sprintf( ptr, "OS: Windows (MingW)\n" ); # else ptr += sprintf( ptr, "OS: Windows\n" ); @@ -321,9 +313,7 @@ static const char* GetHostInfo() RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) }; RtlGetVersion( &ver ); -# ifdef __CYGWIN__ - ptr += sprintf( ptr, "OS: Windows %i.%i.%i (Cygwin)\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); -# elif defined __MINGW32__ +# ifdef __MINGW32__ ptr += sprintf( ptr, "OS: Windows %i.%i.%i (MingW)\n", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber ); # else ptr += sprintf( ptr, "OS: Windows %i.%i.%i\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); @@ -371,10 +361,9 @@ static const char* GetHostInfo() ptr += sprintf( ptr, "Compiler: unknown\n" ); #endif -#if defined _WIN32 || defined __CYGWIN__ -# ifndef __CYGWIN__ +#if defined _WIN32 InitWinSock(); -# endif + char hostname[512]; gethostname( hostname, 512 ); @@ -492,7 +481,7 @@ static const char* GetHostInfo() ptr += sprintf( ptr, "CPU cores: %i\n", std::thread::hardware_concurrency() ); -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 MEMORYSTATUSEX statex; statex.dwLength = sizeof( statex ); GlobalMemoryStatusEx( &statex ); @@ -524,7 +513,7 @@ static const char* GetHostInfo() static uint64_t GetPid() { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 return uint64_t( GetCurrentProcessId() ); #else return uint64_t( getpid() ); @@ -562,7 +551,7 @@ static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz, return msg; } -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 static DWORD s_profilerThreadId = 0; static char s_crashText[1024]; @@ -914,7 +903,7 @@ TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; } TRACY_API int64_t GetFrequencyQpc() { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 LARGE_INTEGER t; QueryPerformanceFrequency( &t ); return t.QuadPart; @@ -1127,12 +1116,7 @@ TRACY_API int64_t GetInitTime() { return s_initTime.val; } TRACY_API std::atomic& GetLockCounter() { return s_lockCounter; } TRACY_API std::atomic& GetGpuCtxCounter() { return s_gpuCtxCounter; } TRACY_API GpuCtxWrapper& GetGpuCtx() { return s_gpuCtx; } -# ifdef __CYGWIN__ -// Hackfix for cygwin reporting memory frees without matching allocations. WTF? -TRACY_API uint64_t GetThreadHandle() { return detail::GetThreadHandleImpl(); } -# else TRACY_API uint64_t GetThreadHandle() { return s_threadHandle.val; } -# endif std::atomic& GetThreadNameData() { return s_threadNameData; } @@ -1229,7 +1213,7 @@ void Profiler::SpawnWorkerThreads() new(s_compressThread) Thread( LaunchCompressWorker, this ); #endif -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 s_profilerThreadId = GetThreadId( s_thread->Handle() ); m_exceptionHandler = AddVectoredExceptionHandler( 1, CrashFilter ); #endif @@ -1263,7 +1247,7 @@ Profiler::~Profiler() { m_shutdown.store( true, std::memory_order_relaxed ); -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 if( m_crashHandlerInstalled ) RemoveVectoredExceptionHandler( m_exceptionHandler ); #endif @@ -2899,7 +2883,7 @@ void Profiler::ReportTopology() uint32_t thread; }; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 t_GetLogicalProcessorInformationEx _GetLogicalProcessorInformationEx = (t_GetLogicalProcessorInformationEx)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetLogicalProcessorInformationEx" ); if( !_GetLogicalProcessorInformationEx ) return; @@ -3344,7 +3328,7 @@ void Profiler::SendCodeLocation( uint64_t ptr ) #endif } -#if ( defined _WIN32 || defined __CYGWIN__ ) && defined TRACY_TIMER_QPC +#if defined _WIN32 && defined TRACY_TIMER_QPC int64_t Profiler::GetTimeQpc() { LARGE_INTEGER t; diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index f120f1d3..665ceb4a 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -17,7 +17,7 @@ #include "../common/TracyMutex.hpp" #include "../common/TracyProtocol.hpp" -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # include #endif #ifdef __APPLE__ @@ -25,7 +25,7 @@ # include #endif -#if !defined TRACY_TIMER_FALLBACK && ( defined _WIN32 || defined __CYGWIN__ || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) ) +#if !defined TRACY_TIMER_FALLBACK && ( defined _WIN32 || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) ) # define TRACY_HW_TIMER #endif @@ -130,7 +130,7 @@ public: #ifdef TRACY_HW_TIMER # if defined TARGET_OS_IOS && TARGET_OS_IOS == 1 return mach_absolute_time(); -# elif defined _WIN32 || defined __CYGWIN__ +# elif defined _WIN32 # ifdef TRACY_TIMER_QPC return GetTimeQpc(); # else @@ -748,7 +748,7 @@ private: GetProfiler().m_serialQueue.commit_next(); } -#if ( defined _WIN32 || defined __CYGWIN__ ) && defined TRACY_TIMER_QPC +#if defined _WIN32 && defined TRACY_TIMER_QPC static int64_t GetTimeQpc(); #endif @@ -812,7 +812,7 @@ private: char* m_queryData; char* m_queryDataPtr; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 void* m_exceptionHandler; #endif #ifdef __linux__ diff --git a/client/TracySysTime.cpp b/client/TracySysTime.cpp index f4d0275f..b690a911 100644 --- a/client/TracySysTime.cpp +++ b/client/TracySysTime.cpp @@ -2,7 +2,7 @@ #ifdef TRACY_HAS_SYSTIME -# if defined _WIN32 || defined __CYGWIN__ +# if defined _WIN32 # include # elif defined __linux__ # include @@ -18,7 +18,7 @@ namespace tracy { -# if defined _WIN32 || defined __CYGWIN__ +# if defined _WIN32 static inline uint64_t ConvertTime( const FILETIME& t ) { @@ -95,7 +95,7 @@ float SysTime::Get() const auto diffIdle = idle - oldIdle; const auto diffUsed = used - oldUsed; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 return diffUsed == 0 ? -1 : ( diffUsed - diffIdle ) * 100.f / diffUsed; #elif defined __linux__ || defined __APPLE__ || defined BSD const auto total = diffUsed + diffIdle; diff --git a/client/TracySysTime.hpp b/client/TracySysTime.hpp index fc6ba321..cb5ebe73 100644 --- a/client/TracySysTime.hpp +++ b/client/TracySysTime.hpp @@ -1,7 +1,7 @@ #ifndef __TRACYSYSTIME_HPP__ #define __TRACYSYSTIME_HPP__ -#if defined _WIN32 || defined __CYGWIN__ || defined __linux__ || defined __APPLE__ +#if defined _WIN32 || defined __linux__ || defined __APPLE__ # define TRACY_HAS_SYSTIME #else # include diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 5272f1fc..af72a3da 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -5,7 +5,7 @@ #ifdef TRACY_HAS_SYSTEM_TRACING #ifndef TRACY_SAMPLING_HZ -# if defined _WIN32 || defined __CYGWIN__ +# if defined _WIN32 # define TRACY_SAMPLING_HZ 8000 # elif defined __linux__ # define TRACY_SAMPLING_HZ 10000 @@ -17,7 +17,7 @@ namespace tracy static constexpr int GetSamplingFrequency() { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 return TRACY_SAMPLING_HZ > 8000 ? 8000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ ); #else return TRACY_SAMPLING_HZ > 1000000 ? 1000000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ ); @@ -31,7 +31,7 @@ static constexpr int GetSamplingPeriod() } -# if defined _WIN32 || defined __CYGWIN__ +# if defined _WIN32 # ifndef NOMINMAX # define NOMINMAX @@ -129,14 +129,6 @@ struct VSyncInfo uint64_t flipFenceId; }; -#ifdef __CYGWIN__ -extern "C" typedef DWORD (WINAPI *t_GetProcessIdOfThread)( HANDLE ); -extern "C" typedef DWORD (WINAPI *t_GetProcessImageFileNameA)( HANDLE, LPSTR, DWORD ); -extern "C" ULONG WMIAPI TraceSetInformation(TRACEHANDLE SessionHandle, TRACE_INFO_CLASS InformationClass, PVOID TraceInformation, ULONG InformationLength); -t_GetProcessIdOfThread GetProcessIdOfThread = (t_GetProcessIdOfThread)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetProcessIdOfThread" ); -t_GetProcessImageFileNameA GetProcessImageFileNameA = (t_GetProcessImageFileNameA)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "K32GetProcessImageFileNameA" ); -#endif - extern "C" typedef NTSTATUS (WINAPI *t_NtQueryInformationThread)( HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG ); extern "C" typedef BOOL (WINAPI *t_EnumProcessModules)( HANDLE, HMODULE*, DWORD, LPDWORD ); extern "C" typedef BOOL (WINAPI *t_GetModuleInformation)( HANDLE, HMODULE, LPMODULEINFO, DWORD ); diff --git a/client/TracySysTrace.hpp b/client/TracySysTrace.hpp index 688cbf2a..12106b6d 100644 --- a/client/TracySysTrace.hpp +++ b/client/TracySysTrace.hpp @@ -1,7 +1,7 @@ #ifndef __TRACYSYSTRACE_HPP__ #define __TRACYSYSTRACE_HPP__ -#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 || defined __CYGWIN__ || defined __linux__ ) +#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 || defined __linux__ ) # define TRACY_HAS_SYSTEM_TRACING #endif diff --git a/client/TracyThread.hpp b/client/TracyThread.hpp index edd255e8..5b5ad205 100644 --- a/client/TracyThread.hpp +++ b/client/TracyThread.hpp @@ -1,7 +1,7 @@ #ifndef __TRACYTHREAD_HPP__ #define __TRACYTHREAD_HPP__ -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # include #else # include @@ -25,7 +25,7 @@ public: } }; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 class Thread { diff --git a/common/TracyApi.h b/common/TracyApi.h index a51ee33b..2d4940f7 100644 --- a/common/TracyApi.h +++ b/common/TracyApi.h @@ -1,7 +1,7 @@ #ifndef __TRACYAPI_H__ #define __TRACYAPI_H__ -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # if defined TRACY_EXPORTS # define TRACY_API __declspec(dllexport) # elif defined TRACY_IMPORTS diff --git a/common/TracySocket.cpp b/common/TracySocket.cpp index 1be7f051..176bbc7a 100644 --- a/common/TracySocket.cpp +++ b/common/TracySocket.cpp @@ -489,7 +489,7 @@ bool ListenSocket::Listen( uint16_t port, int backlog ) m_sock = addrinfo_and_socket_for_family( port, AF_INET, &res ); if( m_sock == -1 ) return false; } -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 unsigned long val = 0; setsockopt( m_sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&val, sizeof( val ) ); #elif defined BSD diff --git a/common/TracySystem.cpp b/common/TracySystem.cpp index dee46955..726c1c6c 100644 --- a/common/TracySystem.cpp +++ b/common/TracySystem.cpp @@ -1,15 +1,13 @@ -#if defined _MSC_VER || defined __CYGWIN__ || defined _WIN32 -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# ifndef NOMINMAX -# define NOMINMAX -# endif -#endif #ifdef _MSC_VER # pragma warning(disable:4996) #endif -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# ifndef NOMINMAX +# define NOMINMAX +# endif # include # include #else @@ -40,7 +38,7 @@ #include "TracySystem.hpp" -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 extern "C" typedef HRESULT (WINAPI *t_SetThreadDescription)( HANDLE, PCWSTR ); extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* ); #endif @@ -58,7 +56,7 @@ namespace detail TRACY_API uint64_t GetThreadHandleImpl() { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 static_assert( sizeof( decltype( GetCurrentThreadId() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" ); return uint64_t( GetCurrentThreadId() ); #elif defined __APPLE__ @@ -123,7 +121,7 @@ void ThreadNameMsvcMagic( const THREADNAME_INFO& info ) TRACY_API void SetThreadName( const char* name ) { -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 static auto _SetThreadDescription = (t_SetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "SetThreadDescription" ); if( _SetThreadDescription ) { @@ -142,7 +140,7 @@ TRACY_API void SetThreadName( const char* name ) ThreadNameMsvcMagic( info ); # endif } -#elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__ && !defined __CYGWIN__ +#elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__ { const auto sz = strlen( name ); if( sz <= 15 ) @@ -187,7 +185,7 @@ TRACY_API const char* GetThreadName( uint64_t id ) ptr = ptr->next; } #else -# if defined _WIN32 || defined __CYGWIN__ +# if defined _WIN32 static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" ); if( _GetThreadDescription ) { diff --git a/import-chrome/src/import-chrome.cpp b/import-chrome/src/import-chrome.cpp index 6127b6d9..d6a3ea74 100644 --- a/import-chrome/src/import-chrome.cpp +++ b/import-chrome/src/import-chrome.cpp @@ -14,7 +14,7 @@ #ifdef _MSC_VER # define stat64 _stat64 #endif -#if defined __CYGWIN__ || defined __APPLE__ +#if defined __APPLE__ # define stat64 stat #endif diff --git a/manual/tracy.tex b/manual/tracy.tex index 96022a32..12d74486 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -384,7 +384,7 @@ Moreover, the following platforms are not supported due to how secretive their o \item Google Stadia \end{itemize} -You may also try your luck with Cygwin or Mingw, but don't get your hopes too high. These platforms were usable some time ago, but nobody is actively working on resolving any issues you might encounter with them. +You may also try your luck with Mingw, but don't get your hopes too high. This platform was usable some time ago, but nobody is actively working on resolving any issues you might encounter with it. \subsection{Initial client setup} \label{initialsetup} diff --git a/profiler/src/HttpRequest.cpp b/profiler/src/HttpRequest.cpp index 81fd1a4f..30f21615 100644 --- a/profiler/src/HttpRequest.cpp +++ b/profiler/src/HttpRequest.cpp @@ -7,7 +7,7 @@ #include "../server/TracyVersion.hpp" #include "HttpRequest.hpp" -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 # include extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW ); #elif defined __linux__ @@ -21,13 +21,11 @@ static constexpr char CRLF[2] = { '\r', '\n' }; static const char* GetOsInfo() { static char buf[1024]; -#if defined _WIN32 || defined __CYGWIN__ +#if defined _WIN32 t_RtlGetVersion RtlGetVersion = (t_RtlGetVersion)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlGetVersion" ); if( !RtlGetVersion ) { -# ifdef __CYGWIN__ - sprintf( buf, "Windows (Cygwin)" ); -# elif defined __MINGW32__ +# ifdef __MINGW32__ sprintf( buf, "Windows (MingW)" ); # else sprintf( buf, "Windows" ); @@ -38,9 +36,7 @@ static const char* GetOsInfo() RTL_OSVERSIONINFOW ver = { sizeof( RTL_OSVERSIONINFOW ) }; RtlGetVersion( &ver ); -# ifdef __CYGWIN__ - sprintf( buf, "Windows %i.%i.%i (Cygwin)", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); -# elif defined __MINGW32__ +# ifdef __MINGW32__ sprintf( buf, "Windows %i.%i.%i (MingW)", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber ); # else sprintf( buf, "Windows %i.%i.%i", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); diff --git a/server/TracyFileRead.hpp b/server/TracyFileRead.hpp index 56368888..382553c2 100644 --- a/server/TracyFileRead.hpp +++ b/server/TracyFileRead.hpp @@ -16,7 +16,7 @@ #ifdef _MSC_VER # define stat64 _stat64 #endif -#if defined __CYGWIN__ || defined __APPLE__ +#if defined __APPLE__ # define stat64 stat #endif diff --git a/server/TracyMmap.cpp b/server/TracyMmap.cpp index 29b06e48..bec61a0e 100644 --- a/server/TracyMmap.cpp +++ b/server/TracyMmap.cpp @@ -1,6 +1,6 @@ #include "TracyMmap.hpp" -#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ +#if defined _WIN32 # include # include diff --git a/server/TracyMmap.hpp b/server/TracyMmap.hpp index 017f21bd..d7f99b99 100644 --- a/server/TracyMmap.hpp +++ b/server/TracyMmap.hpp @@ -1,7 +1,7 @@ #ifndef __TRACYMMAP_HPP__ #define __TRACYMMAP_HPP__ -#if !defined _MSC_VER && !defined __MINGW32__ && !defined __CYGWIN__ +#if !defined _WIN32 # include #else # include diff --git a/test/Makefile b/test/Makefile index 90c62b38..b15c22be 100644 --- a/test/Makefile +++ b/test/Makefile @@ -13,9 +13,6 @@ SRC := \ OBJ := $(SRC:%.cpp=%.o) -ifeq ($(shell uname -o),Cygwin) -LIBS += -ldbghelp -endif ifeq ($(shell uname -o),FreeBSD) LIBS += -lexecinfo endif diff --git a/update/src/update.cpp b/update/src/update.cpp index bd923a3f..0823fea8 100644 --- a/update/src/update.cpp +++ b/update/src/update.cpp @@ -15,9 +15,7 @@ #include "../../zstd/zstd.h" #include "../../getopt/getopt.h" -#ifdef __CYGWIN__ -# define ftello64(x) ftello(x) -#elif defined __APPLE__ +#ifdef __APPLE__ # define ftello64(x) ftello(x) #elif defined _WIN32 # define ftello64(x) _ftelli64(x)