all repos — mgba @ 6589eade24599de62c5c2e6ca5dc97560e4bc958

mGBA Game Boy Advance Emulator

Util: Clean up some defines
Jeffrey Pfau jeffrey@endrift.com
Thu, 18 Jun 2015 01:19:33 -0700
commit

6589eade24599de62c5c2e6ca5dc97560e4bc958

parent

a992fcd3d1bc0e20b478b047301e7c11badfe572

1 files changed, 7 insertions(+), 9 deletions(-)

jump to
M src/util/common.hsrc/util/common.h

@@ -19,16 +19,12 @@ #include <stdio.h>

#include <stdlib.h> #include <string.h> +#include "version.h" + #ifdef _MSC_VER -#ifdef _WIN64 -typedef int64_t off_t; -typedef int64_t ssize_t; -#else -typedef int32_t off_t; -typedef int32_t ssize_t; -#endif +typedef intptr_t off_t; +typedef intptr_t ssize_t; #define restrict __restrict -#define SSIZE_MAX ((ssize_t) SIZE_MAX) #define strcasecmp _stricmp #define strncasecmp _strnicmp #define ftruncate _chsize

@@ -37,7 +33,9 @@ #include <strings.h>

#include <unistd.h> #endif -#include "version.h" +#ifndef SSIZE_MAX +#define SSIZE_MAX ((ssize_t) (SIZE_MAX >> 1)) +#endif #define UNUSED(V) (void)(V)