mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Correctly forward declare Win32 functions
_WINDOWS_ is the macro defined by the windows.h header guard, checking it whether the symbols have already been included before forward declaring our own.
This commit is contained in:
parent
32fc011f80
commit
ebd1d00178
@ -8,7 +8,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef _WINDOWS_
|
||||
extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void);
|
||||
#endif
|
||||
#else
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
@ -35,10 +35,15 @@ namespace tracy
|
||||
//---------------------------------------------------------
|
||||
// Semaphore (Windows)
|
||||
//---------------------------------------------------------
|
||||
|
||||
#ifndef MAXLONG
|
||||
enum { MAXLONG = 0x7fffffff };
|
||||
#endif
|
||||
|
||||
#ifndef INFINITE
|
||||
enum { INFINITE = 0xFFFFFFFF };
|
||||
#endif
|
||||
|
||||
#ifndef _WINDOWS_
|
||||
typedef void* HANDLE;
|
||||
|
||||
extern "C" __declspec(dllimport) HANDLE __stdcall CreateSemaphoreA( void*, long, long, const char* );
|
||||
|
Loading…
Reference in New Issue
Block a user