Skip to content

Commit

Permalink
checking against windows instead of specifically msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanDierick authored and SanderMertens committed Jul 18, 2023
1 parent b718c4f commit 9bd03e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/flecs/os_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void ecs_os_set_api_defaults(void);
#define ecs_offset(ptr, T, index)\
ECS_CAST(T*, ECS_OFFSET(ptr, ECS_SIZEOF(T) * index))

#if defined(ECS_TARGET_MSVC)
#if defined(ECS_TARGET_WINDOWS)
#define ecs_os_strcat(str1, str2) strcat_s(str1, INT_MAX, str2)
#define ecs_os_sprintf(ptr, ...) sprintf_s(ptr, INT_MAX, __VA_ARGS__)
#define ecs_os_vsprintf(ptr, fmt, args) vsprintf_s(ptr, INT_MAX, fmt, args)
Expand All @@ -409,7 +409,7 @@ void ecs_os_set_api_defaults(void);
#endif

/* Files */
#if defined(ECS_TARGET_MSVC)
#if defined(ECS_TARGET_WINDOWS)
#define ecs_os_fopen(result, file, mode) fopen_s(result, file, mode)
#else
#define ecs_os_fopen(result, file, mode) (*(result)) = fopen(file, mode)
Expand Down

0 comments on commit 9bd03e9

Please sign in to comment.