Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some syntax errors when compiling via msbuild 2019 compiler toolchain #763

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
msvc: fix syntax errors when compiling via msbuild 2019 compiler tool…
…chain
jstine35 committed May 23, 2021
commit 9933eae471c3c452c7aca1983434fc890ee60441
2 changes: 1 addition & 1 deletion deps/libkirk/amctrl.c
Original file line number Diff line number Diff line change
@@ -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>
7 changes: 2 additions & 5 deletions mednafen/clamp.h
Original file line number Diff line number Diff line change
@@ -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;
7 changes: 5 additions & 2 deletions mednafen/mednafen-types.h
Original file line number Diff line number Diff line change
@@ -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))

@@ -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

1 change: 1 addition & 0 deletions parallel-psx/util/util.hpp
Original file line number Diff line number Diff line change
@@ -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__); \