Fallthrough fixes for MSVC
This commit is contained in:
@@ -55,15 +55,6 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
|
|||||||
# define off64_t off_t
|
# define off64_t off_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_attribute(fallthrough)
|
|
||||||
# define fallthrough __attribute__((fallthrough))
|
|
||||||
#else
|
|
||||||
# if __has_attribute(__fallthrough__)
|
|
||||||
# define fallthrough __attribute__((__fallthrough__))
|
|
||||||
# endif
|
|
||||||
# define fallthrough do {} while (0) /* fallthrough */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define UNUSED(arg) arg
|
# define UNUSED(arg) arg
|
||||||
#else
|
#else
|
||||||
@@ -89,6 +80,19 @@ extern "C" {
|
|||||||
# define ssize_t intptr_t
|
# define ssize_t intptr_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# define fallthrough do {} while (0) /* 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 */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Global variables residing in the platform module. */
|
/* Global variables residing in the platform module. */
|
||||||
extern int dopause; /* system is paused */
|
extern int dopause; /* system is paused */
|
||||||
extern int mouse_capture; /* mouse is captured in app */
|
extern int mouse_capture; /* mouse is captured in app */
|
||||||
|
@@ -18,13 +18,17 @@
|
|||||||
#ifndef EMU_PLAT_FALLTHROUGH_H
|
#ifndef EMU_PLAT_FALLTHROUGH_H
|
||||||
#define EMU_PLAT_FALLTHROUGH_H
|
#define EMU_PLAT_FALLTHROUGH_H
|
||||||
|
|
||||||
#if __has_attribute(__fallthrough__)
|
#ifdef _MSC_VER
|
||||||
# define fallthrough __attribute__((__fallthrough__))
|
# define fallthrough do {} while (0) /* fallthrough */
|
||||||
#else
|
#else
|
||||||
# if __has_attribute(fallthrough)
|
# if __has_attribute(fallthrough)
|
||||||
# define fallthrough __attribute__((fallthrough))
|
# define fallthrough __attribute__((fallthrough))
|
||||||
|
# else
|
||||||
|
# if __has_attribute(__fallthrough__)
|
||||||
|
# define fallthrough __attribute__((__fallthrough__))
|
||||||
# endif
|
# endif
|
||||||
# define fallthrough do {} while (0) /* fallthrough */
|
# define fallthrough do {} while (0) /* fallthrough */
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /*EMU_PLAT_FALLTHROUGH_H*/
|
#endif /*EMU_PLAT_FALLTHROUGH_H*/
|
||||||
|
Reference in New Issue
Block a user