1 #ifndef __PORT_TYPEDEFS_H
2 #define __PORT_TYPEDEFS_H
3 
4 #include "libretro.h"
5 #if 0
6 #ifndef IOS
7 	// This is a nightmarish hack brought forth by file_stream_transform...
8 	// Code using string types, char types and file functions will fail
9 	// on msvc2017 if we don't include the following libraries before
10 	// file_stream_transforms due to conflicting declarations.
11 	// It also seems one of those includes provide math on msvc2017, so
12 	// we'll lack M_PI if we don't define _USE_MATH_DEFINES right now.
13 	// Furthermore, <string> breaks FBNEO_DEBUG while <string.h> breaks
14 	// msvc2017 x86 builds...
15 	#define _USE_MATH_DEFINES
16 	#include <wchar.h>
17 	#ifndef _MSC_VER
18 		#include <string.h>
19 	#else
20 		#include <string>
21 	#endif
22 #endif
23 #endif
24 #if defined(_MSC_VER) || defined(__MINGW32__)
25 	#define _USE_MATH_DEFINES
26 	#include <wchar.h>
27 	#include <string>
28 #endif
29 #include "streams/file_stream_transforms.h"
30 
31 extern int kNetGame;
32 extern int bRunPause;
33 
34 #ifdef USE_CYCLONE
35 	#define SEK_CORE_C68K (0)
36 	#define SEK_CORE_M68K (1)
37 	extern int nSekCpuCore;  // 0 - c68k, 1 - m68k
38 #endif
39 
40 /* fastcall only works on x86_32 */
41 #ifndef FASTCALL
42 	#undef __fastcall
43 	#define __fastcall
44 #else
45 	#ifndef _MSC_VER
46 		#undef __fastcall
47 		#define __fastcall __attribute__((fastcall))
48 	#endif
49 #endif
50 
51 #ifndef _MSC_VER
52 	#include <stdint.h>
53 #else
54 	#undef _UNICODE
55 	#include "compat/msvc.h"
56 	#include "compat/posix_string.h"
57 #endif
58 
59 #define _T(x) x
60 #define _tfopen fopen
61 #define _fgetts fgets
62 #define _stprintf sprintf
63 #define _tcslen strlen
64 #define _tcscpy strcpy
65 #define _tcstol strtol
66 #define _istspace isspace
67 #define _tcsncmp strncmp
68 #define _tcsncpy strncpy
69 #define _tcsicmp strcasecmp
70 #define _stricmp strcasecmp
71 #define stricmp strcasecmp
72 #define _ftprintf fprintf
73 
74 typedef char TCHAR;
75 
76 #endif
77