Skip to content

Commit

Permalink
msvc: fix syntax errors when compiling via msbuild 2019 compiler tool…
Browse files Browse the repository at this point in the history
…chain
  • Loading branch information
jstine35 committed May 23, 2021
1 parent 124a2d1 commit 9933eae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deps/libkirk/amctrl.c
Expand Up @@ -2,7 +2,7 @@
// Copyright (C) 2015 Hykem <hykem@hotmail.com>
// Licensed under the terms of the GNU GPL, version 3
// http://www.gnu.org/licenses/gpl-3.0.txt


#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
Expand Down
7 changes: 2 additions & 5 deletions mednafen/clamp.h
Expand Up @@ -6,11 +6,8 @@ extern "C" {
#endif

#include <stddef.h>
#ifndef _WIN32
#include <unistd.h>
#endif

static INLINE void clamp(int32_t *val, ssize_t min, ssize_t max)
// ptrdiff_t (adopted by C99/C++) is generally a more portable version of ssize_t (POSIX only).
static INLINE void clamp(int32_t *val, ptrdiff_t min, ptrdiff_t max)
{
if(*val < min)
*val = min;
Expand Down
7 changes: 5 additions & 2 deletions mednafen/mednafen-types.h
Expand Up @@ -117,9 +117,9 @@ typedef uint64_t uint64;
#define MDFN_MAKE_GCCV(maj,min,pl) (((maj)*100*100) + ((min) * 100) + (pl))
#define MDFN_GCC_VERSION MDFN_MAKE_GCCV(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)

#ifndef INLINE
#ifndef INLINE
#define INLINE inline __attribute__((always_inline))
#endif
#endif

#define NO_INLINE __attribute__((noinline))

Expand Down Expand Up @@ -176,7 +176,10 @@ typedef uint64_t uint64;
// Begin MSVC
//

#if !defined(INLINE)
#define INLINE __forceinline
#endif

#define NO_INLINE __declspec(noinline)
#define NO_CLONE

Expand Down
1 change: 1 addition & 0 deletions parallel-psx/util/util.hpp
Expand Up @@ -39,6 +39,7 @@ extern retro_log_printf_t libretro_log;
#define LOGI(...) do { if (::Granite::libretro_log) ::Granite::libretro_log(RETRO_LOG_INFO, __VA_ARGS__); } while(0)
#elif defined(_MSC_VER)
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#define LOGE(...) do { \
fprintf(stderr, "[ERROR]: " __VA_ARGS__); \
Expand Down

0 comments on commit 9933eae

Please sign in to comment.