INLINE that can be redefined by MSVC
12 files changed:
TARGET ?= PicoDrive
CFLAGS += -Wall -ggdb -falign-functions=2
TARGET ?= PicoDrive
CFLAGS += -Wall -ggdb -falign-functions=2
+CFLAGS += -I. -DINLINE=inline
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG -ffunction-sections
ifeq ($(findstring clang,$(CC)),)
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG -ffunction-sections
ifeq ($(findstring clang,$(CC)),)
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
-ifeq ($(DONT_COMPILE_IN_ZLIB),1)
ifeq ($(NO_MMAP),1)
CFLAGS += -DNO_MMAP
ifeq ($(NO_MMAP),1)
CFLAGS += -DNO_MMAP
\r
/* */\r
#if PICODRIVE_HACKS\r
\r
/* */\r
#if PICODRIVE_HACKS\r
-static inline unsigned char picodrive_read(unsigned short a)\r
+static INLINE unsigned char picodrive_read(unsigned short a)\r
{\r
uptr v = z80_read_map[a >> Z80_MEM_SHIFT];\r
if (map_flag_set(v))\r
{\r
uptr v = z80_read_map[a >> Z80_MEM_SHIFT];\r
if (map_flag_set(v))\r
-static inline int pdb_net_connect(const char *host, const char *port) {return 0;}
+static INLINE int pdb_net_connect(const char *host, const char *port) {return 0;}
reg_temp[i].flags &= ~HRF_LOCKED;
}
reg_temp[i].flags &= ~HRF_LOCKED;
}
-static inline u32 rcache_used_hreg_mask(void)
+static INLINE u32 rcache_used_hreg_mask(void)
//#include "debugger.h"\r
//#include "sh2.h"\r
//#include "sh2comn.h"\r
//#include "debugger.h"\r
//#include "sh2.h"\r
//#include "sh2comn.h"\r
#define INLINE static\r
\r
//CPU_DISASSEMBLE( sh2 );\r
#define INLINE static\r
\r
//CPU_DISASSEMBLE( sh2 );\r
// this nasty conversion is needed for drc-expecting memhandlers
#define MAKE_READFUNC(name, cname) \
// this nasty conversion is needed for drc-expecting memhandlers
#define MAKE_READFUNC(name, cname) \
-static inline unsigned int name(SH2 *sh2, unsigned int a) \
+static INLINE unsigned int name(SH2 *sh2, unsigned int a) \
{ \
unsigned int ret; \
sh2->sr |= sh2->icount << 12; \
{ \
unsigned int ret; \
sh2->sr |= sh2->icount << 12; \
}
#define MAKE_WRITEFUNC(name, cname) \
}
#define MAKE_WRITEFUNC(name, cname) \
-static inline void name(SH2 *sh2, unsigned int a, unsigned int d) \
+static INLINE void name(SH2 *sh2, unsigned int a, unsigned int d) \
{ \
sh2->sr |= sh2->icount << 12; \
cname(a, d, sh2); \
{ \
sh2->sr |= sh2->icount << 12; \
cname(a, d, sh2); \
int sh2_execute_drc(SH2 *sh2c, int cycles);\r
int sh2_execute_interpreter(SH2 *sh2c, int cycles);\r
\r
int sh2_execute_drc(SH2 *sh2c, int cycles);\r
int sh2_execute_interpreter(SH2 *sh2c, int cycles);\r
\r
-static inline int sh2_execute(SH2 *sh2, int cycles, int use_drc)\r
+static INLINE int sh2_execute(SH2 *sh2, int cycles, int use_drc)\r
oldest, event_time_next);
}
oldest, event_time_next);
}
-static inline void run_sh2(SH2 *sh2, int m68k_cycles)
+static INLINE void run_sh2(SH2 *sh2, int m68k_cycles)
-static inline void SekRunM68k(int cyc)
+static INLINE void SekRunM68k(int cyc)
{
SekCycleAim += cyc;
SekSyncM68k();
{
SekCycleAim += cyc;
SekSyncM68k();
#endif\r
\r
/* avoid dependency on newer glibc */\r
#endif\r
\r
/* avoid dependency on newer glibc */\r
-static __inline int isspace_(int c)\r
+static INLINE int isspace_(int c)\r
{\r
return (0x09 <= c && c <= 0x0d) || c == ' ';\r
}\r
{\r
return (0x09 <= c && c <= 0x0d) || c == ' ';\r
}\r
\r
int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp) = NULL;\r
\r
\r
int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp) = NULL;\r
\r
-static __inline void AutoIncrement(void)\r
+static INLINE void AutoIncrement(void)\r
{\r
Pico.video.addr=(unsigned short)(Pico.video.addr+Pico.video.reg[0xf]);\r
}\r
{\r
Pico.video.addr=(unsigned short)(Pico.video.addr+Pico.video.reg[0xf]);\r
}\r