Rename platform constants
This commit is contained in:
@@ -89,8 +89,8 @@ wapp_intern u64 split_mix_64(SplitMix64State *state) {
|
||||
return result ^ (result >> 31);
|
||||
}
|
||||
|
||||
#if defined(WAPP_PLATFORM_C) && WAPP_PLATFORM_C_VERSION >= WAPP_PLATFORM_C11_VERSION
|
||||
#ifdef WAPP_PLATFORM_POSIX
|
||||
#if defined(WP_PLATFORM_C) && WP_PLATFORM_C_VERSION >= WP_PLATFORM_C11_VERSION
|
||||
#ifdef WP_PLATFORM_POSIX
|
||||
wapp_intern void seed_os_generator(void) {
|
||||
struct timespec ts = {0};
|
||||
int result = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
@@ -117,7 +117,7 @@ wapp_intern u64 generate_random_number(void) {
|
||||
|
||||
return (((u64)n1) << 32 | (u64)n2);
|
||||
}
|
||||
#endif // !WAPP_PLATFORM_POSIX
|
||||
#endif // !WP_PLATFORM_POSIX
|
||||
#else
|
||||
wapp_intern void seed_os_generator(void) {
|
||||
time_t result = time(NULL);
|
||||
@@ -132,4 +132,4 @@ wapp_intern u64 generate_random_number(void) {
|
||||
|
||||
return (((u64)n1) << 32 | (u64)n2);
|
||||
}
|
||||
#endif // !WAPP_PLATFORM_C
|
||||
#endif // !WP_PLATFORM_C
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#include "../../common/aliases/aliases.h"
|
||||
#include "../../common/platform/platform.h"
|
||||
|
||||
#ifdef WAPP_PLATFORM_CPP
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
BEGIN_C_LINKAGE
|
||||
#endif // !WAPP_PLATFORM_CPP
|
||||
#endif // !WP_PLATFORM_CPP
|
||||
|
||||
typedef struct XOR256State XOR256State;
|
||||
struct XOR256State {
|
||||
@@ -23,8 +23,8 @@ u64 wapp_prng_xorshift_256(XOR256State *state);
|
||||
u64 wapp_prng_xorshift_256ss(XOR256State *state);
|
||||
u64 wapp_prng_xorshift_256p(XOR256State *state);
|
||||
|
||||
#ifdef WAPP_PLATFORM_CPP
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
END_C_LINKAGE
|
||||
#endif // !WAPP_PLATFORM_CPP
|
||||
#endif // !WP_PLATFORM_CPP
|
||||
|
||||
#endif // !XORSHIFT_H
|
||||
|
||||
Reference in New Issue
Block a user