mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +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
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifndef _WINDOWS_
|
||||||
extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void);
|
extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,10 +35,15 @@ namespace tracy
|
|||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// Semaphore (Windows)
|
// Semaphore (Windows)
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
#ifndef MAXLONG
|
#ifndef MAXLONG
|
||||||
enum { MAXLONG = 0x7fffffff };
|
enum { MAXLONG = 0x7fffffff };
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef INFINITE
|
||||||
enum { INFINITE = 0xFFFFFFFF };
|
enum { INFINITE = 0xFFFFFFFF };
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WINDOWS_
|
||||||
typedef void* HANDLE;
|
typedef void* HANDLE;
|
||||||
|
|
||||||
extern "C" __declspec(dllimport) HANDLE __stdcall CreateSemaphoreA( void*, long, long, const char* );
|
extern "C" __declspec(dllimport) HANDLE __stdcall CreateSemaphoreA( void*, long, long, const char* );
|
||||||
|
Loading…
Reference in New Issue
Block a user