aboutsummaryrefslogtreecommitdiff
path: root/source/port.h
diff options
context:
space:
mode:
authortwinaphex2017-08-11 17:43:00 +0200
committertwinaphex2017-08-11 17:43:00 +0200
commitb9c74ceb1352c8f433cf6bf2c446ae07457c5267 (patch)
treeafd398fed3d08c81957373be55a12284cb932ab6 /source/port.h
parent1aecedc999445e9a27e04f665fd562b576775d08 (diff)
downloadsnes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.gz
snes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.bz2
snes9x2005-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.zip
Start making this suitable for MSVC and C89
Diffstat (limited to 'source/port.h')
-rw-r--r--source/port.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/port.h b/source/port.h
index 12d210c..3d96509 100644
--- a/source/port.h
+++ b/source/port.h
@@ -6,6 +6,7 @@
#include <limits.h>
#include <string.h>
#include <sys/types.h>
+#include <retro_inline.h>
#ifdef PSP
#define PIXEL_FORMAT BGR555
@@ -23,11 +24,25 @@
#define PATH_MAX 1024
#endif
+#ifndef _MAX_DIR
#define _MAX_DIR PATH_MAX
+#endif
+
+#ifndef _MAX_DRIVE
#define _MAX_DRIVE 1
+#endif
+
+#ifndef _MAX_FNAME
#define _MAX_FNAME PATH_MAX
+#endif
+
+#ifndef _MAX_EXT
#define _MAX_EXT PATH_MAX
+#endif
+
+#ifndef _MAX_PATH
#define _MAX_PATH PATH_MAX
+#endif
void _makepath(char* path, const char* drive, const char* dir, const char* fname, const char* ext);
void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext);
@@ -55,7 +70,7 @@ void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext
#define MAX(A,B) ((A) > (B) ? (A) : (B))
/* Integer square root by Halleck's method, with Legalize's speedup */
-static inline int32_t _isqrt(int32_t val)
+static INLINE int32_t _isqrt(int32_t val)
{
int32_t squaredbit, remainder, root;