Remove all non-library _MSC_VER checks

This commit is contained in:
starfrost013
2025-12-22 22:36:15 +00:00
parent 11976adced
commit 7860e06f8a
11 changed files with 26 additions and 95 deletions

View File

@@ -69,19 +69,10 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
# define fseeko64 fseeko
# define ftello64 ftello
# define off64_t off_t
#elif defined(_MSC_VER)
// # define fopen64 fopen
# define fseeko64 _fseeki64
# define ftello64 _ftelli64
# define off64_t off_t
#endif
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
/* A hack (GCC-specific?) to allow us to ignore unused parameters. */
# define UNUSED(arg) __attribute__((unused)) arg
#endif
/* Return the size (in wchar's) of a wchar_t array. */
#define sizeof_w(x) (sizeof((x)) / sizeof(wchar_t))
@@ -97,17 +88,14 @@ extern "C" {
# define atomic_flag_t atomic_flag
# define atomic_bool_t atomic_bool
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#endif

View File

@@ -16,18 +16,16 @@
#define EMU_PLAT_FALLTHROUGH_H
#ifndef EMU_PLAT_H
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#endif
#endif /*EMU_PLAT_FALLTHROUGH_H*/

View File

@@ -19,12 +19,9 @@
#define EMU_PLAT_UNUSED_H
#ifndef EMU_PLAT_H
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
/* A hack (GCC-specific?) to allow us to ignore unused parameters. */
# define UNUSED(arg) __attribute__((unused)) arg
#endif
#endif
#endif
#endif /*EMU_PLAT_UNUSED_H*/

View File

@@ -8,11 +8,7 @@
#ifndef VIDEO_VOODOO_CODEGEN_X86_64_H
#define VIDEO_VOODOO_CODEGEN_X86_64_H
#ifdef _MSC_VER
# include <intrin.h>
#else
# include <xmmintrin.h>
#endif
#include <xmmintrin.h>
#define BLOCK_NUM 8
#define BLOCK_MASK (BLOCK_NUM - 1)

View File

@@ -8,11 +8,7 @@
#ifndef VIDEO_VOODOO_CODEGEN_X86_H
#define VIDEO_VOODOO_CODEGEN_X86_H
#ifdef _MSC_VER
# include <intrin.h>
#else
# include <xmmintrin.h>
#endif
#include <xmmintrin.h>
#define BLOCK_NUM 8
#define BLOCK_MASK (BLOCK_NUM - 1)