fix enet
parent
2ea8b3da07
commit
3070fece7e
|
@ -308722,8 +308722,8 @@ int main() {
|
||||||
|
|
||||||
#ifndef ENET_NO_PRAGMA_LINK
|
#ifndef ENET_NO_PRAGMA_LINK
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#pragma comment(lib, "ws2_32.lib")
|
#pragma comment(lib, "ws2_32") //< @r-lyeh removed .lib (tcc support)
|
||||||
#pragma comment(lib, "winmm.lib")
|
#pragma comment(lib, "winmm") //< @r-lyeh removed .lib (tcc support)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -308747,14 +308747,16 @@ int main() {
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) || defined(_MSC_VER)
|
||||||
#if _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900 //< @zak, tcc support
|
||||||
typedef struct timespec {
|
typedef struct timespec {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_nsec;
|
long tv_nsec;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#define CLOCK_MONOTONIC 0
|
#ifndef __MINGW32__
|
||||||
|
#define CLOCK_MONOTONIC 0 //< @r-lyeh, tcc support
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef SOCKET ENetSocket;
|
typedef SOCKET ENetSocket;
|
||||||
|
@ -309880,7 +309882,14 @@ extern "C" {
|
||||||
#endif /* AT_HAVE_ATOMICS */
|
#endif /* AT_HAVE_ATOMICS */
|
||||||
|
|
||||||
#undef AT_HAVE_ATOMICS
|
#undef AT_HAVE_ATOMICS
|
||||||
|
#else //< @r-lyeh: add __TINYC__ stubs. not going to work.
|
||||||
|
#define ENET_ATOMIC_READ(variable) (*(int64_t *)(variable))
|
||||||
|
#define ENET_ATOMIC_WRITE(variable, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_CAS(variable, old_value, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_INC(variable) ENET_ATOMIC_INC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_DEC(variable) ENET_ATOMIC_DEC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_INC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) + (delta))
|
||||||
|
#define ENET_ATOMIC_DEC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) - (delta))
|
||||||
#endif /* defined(_MSC_VER) */
|
#endif /* defined(_MSC_VER) */
|
||||||
|
|
||||||
// =======================================================================//
|
// =======================================================================//
|
||||||
|
|
|
@ -73,8 +73,8 @@
|
||||||
|
|
||||||
#ifndef ENET_NO_PRAGMA_LINK
|
#ifndef ENET_NO_PRAGMA_LINK
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#pragma comment(lib, "ws2_32.lib")
|
#pragma comment(lib, "ws2_32") //< @r-lyeh removed .lib (tcc support)
|
||||||
#pragma comment(lib, "winmm.lib")
|
#pragma comment(lib, "winmm") //< @r-lyeh removed .lib (tcc support)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -98,14 +98,16 @@
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) || defined(_MSC_VER)
|
||||||
#if _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900 //< @zak, tcc support
|
||||||
typedef struct timespec {
|
typedef struct timespec {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_nsec;
|
long tv_nsec;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#define CLOCK_MONOTONIC 0
|
#ifndef __MINGW32__
|
||||||
|
#define CLOCK_MONOTONIC 0 //< @r-lyeh, tcc support
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef SOCKET ENetSocket;
|
typedef SOCKET ENetSocket;
|
||||||
|
@ -1231,7 +1233,14 @@ extern "C" {
|
||||||
#endif /* AT_HAVE_ATOMICS */
|
#endif /* AT_HAVE_ATOMICS */
|
||||||
|
|
||||||
#undef AT_HAVE_ATOMICS
|
#undef AT_HAVE_ATOMICS
|
||||||
|
#else //< @r-lyeh: add __TINYC__ stubs. not going to work.
|
||||||
|
#define ENET_ATOMIC_READ(variable) (*(int64_t *)(variable))
|
||||||
|
#define ENET_ATOMIC_WRITE(variable, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_CAS(variable, old_value, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_INC(variable) ENET_ATOMIC_INC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_DEC(variable) ENET_ATOMIC_DEC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_INC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) + (delta))
|
||||||
|
#define ENET_ATOMIC_DEC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) - (delta))
|
||||||
#endif /* defined(_MSC_VER) */
|
#endif /* defined(_MSC_VER) */
|
||||||
|
|
||||||
// =======================================================================//
|
// =======================================================================//
|
||||||
|
|
21
engine/v4k
21
engine/v4k
|
@ -289829,8 +289829,8 @@ int main() {
|
||||||
|
|
||||||
#ifndef ENET_NO_PRAGMA_LINK
|
#ifndef ENET_NO_PRAGMA_LINK
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#pragma comment(lib, "ws2_32.lib")
|
#pragma comment(lib, "ws2_32") //< @r-lyeh removed .lib (tcc support)
|
||||||
#pragma comment(lib, "winmm.lib")
|
#pragma comment(lib, "winmm") //< @r-lyeh removed .lib (tcc support)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -289854,14 +289854,16 @@ int main() {
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) || defined(_MSC_VER)
|
||||||
#if _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900 //< @zak, tcc support
|
||||||
typedef struct timespec {
|
typedef struct timespec {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_nsec;
|
long tv_nsec;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#define CLOCK_MONOTONIC 0
|
#ifndef __MINGW32__
|
||||||
|
#define CLOCK_MONOTONIC 0 //< @r-lyeh, tcc support
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef SOCKET ENetSocket;
|
typedef SOCKET ENetSocket;
|
||||||
|
@ -290987,7 +290989,14 @@ extern "C" {
|
||||||
#endif /* AT_HAVE_ATOMICS */
|
#endif /* AT_HAVE_ATOMICS */
|
||||||
|
|
||||||
#undef AT_HAVE_ATOMICS
|
#undef AT_HAVE_ATOMICS
|
||||||
|
#else //< @r-lyeh: add __TINYC__ stubs. not going to work.
|
||||||
|
#define ENET_ATOMIC_READ(variable) (*(int64_t *)(variable))
|
||||||
|
#define ENET_ATOMIC_WRITE(variable, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_CAS(variable, old_value, new_val) (*(int64_t *)(variable) = (int64_t)(new_val))
|
||||||
|
#define ENET_ATOMIC_INC(variable) ENET_ATOMIC_INC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_DEC(variable) ENET_ATOMIC_DEC_BY(variable, 1)
|
||||||
|
#define ENET_ATOMIC_INC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) + (delta))
|
||||||
|
#define ENET_ATOMIC_DEC_BY(variable, delta) ( *(int64_t*)(variable) = (int64_t*)(variable) - (delta))
|
||||||
#endif /* defined(_MSC_VER) */
|
#endif /* defined(_MSC_VER) */
|
||||||
|
|
||||||
// =======================================================================//
|
// =======================================================================//
|
||||||
|
|
Loading…
Reference in New Issue