Fixed compilation on linux
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -23,12 +23,17 @@ evstring_readFile(
|
|||||||
#ifdef EV_HELPERS_IMPLEMENTATION
|
#ifdef EV_HELPERS_IMPLEMENTATION
|
||||||
#undef EV_HELPERS_IMPLEMENTATION
|
#undef EV_HELPERS_IMPLEMENTATION
|
||||||
|
|
||||||
|
|
||||||
evstring
|
evstring
|
||||||
evstring_readFile(
|
evstring_readFile(
|
||||||
evstring filePath)
|
evstring filePath)
|
||||||
{
|
{
|
||||||
FILE* f = NULL;
|
FILE* f = NULL;
|
||||||
|
#if EV_OS_WINDOWS
|
||||||
if(fopen_s(&f,filePath,"rb")) return EV_INVALID(evstring);
|
if(fopen_s(&f,filePath,"rb")) return EV_INVALID(evstring);
|
||||||
|
#else
|
||||||
|
f = fopen(filePath, "rb");
|
||||||
|
#endif
|
||||||
|
|
||||||
fseek(f, 0, SEEK_END);
|
fseek(f, 0, SEEK_END);
|
||||||
u32 buflen = ftell(f);
|
u32 buflen = ftell(f);
|
||||||
|
|||||||
11
ev_numeric.h
11
ev_numeric.h
@@ -97,4 +97,15 @@ static const struct Float64Data Float64 =
|
|||||||
.EPS = 2.2204460492503131e-016
|
.EPS = 2.2204460492503131e-016
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !EV_OS_WINDOWS
|
||||||
|
#define max(a,b) \
|
||||||
|
({ __typeof__(a) _a = (a); \
|
||||||
|
__typeof__(b) _b = (b); \
|
||||||
|
_a > _b ? _a : _b; })
|
||||||
|
#define min(a,b) \
|
||||||
|
({ __typeof__(a) _a = (a); \
|
||||||
|
__typeof__(b) _b = (b); \
|
||||||
|
_a < _b ? _a : _b; })
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // EV_HEADERS_NUMERIC_H
|
#endif // EV_HEADERS_NUMERIC_H
|
||||||
|
|||||||
4
ev_vec.h
4
ev_vec.h
@@ -6,6 +6,10 @@
|
|||||||
#include "ev_types.h"
|
#include "ev_types.h"
|
||||||
#include "ev_numeric.h"
|
#include "ev_numeric.h"
|
||||||
|
|
||||||
|
#if !EV_OS_WINDOWS
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(EV_VEC_SHARED)
|
#if defined(EV_VEC_SHARED)
|
||||||
# if defined (EV_VEC_IMPL)
|
# if defined (EV_VEC_IMPL)
|
||||||
# define EV_VEC_API EV_EXPORT
|
# define EV_VEC_API EV_EXPORT
|
||||||
|
|||||||
Reference in New Issue
Block a user