From 07ef71ef8bd0c555884c369362e085e8ffed24ae Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Thu, 31 Mar 2016 13:48:27 -0500 Subject: [PATCH] osx x86 invalid intptr_t conversion (nw) src/osd/sdl/output.cpp:86:50: error: format specifies type 'int' but the argument has type 'intptr_t' (aka 'long') --- src/osd/sdl/output.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/osd/sdl/output.cpp b/src/osd/sdl/output.cpp index f2348f592e2..a2eb5b3dad1 100644 --- a/src/osd/sdl/output.cpp +++ b/src/osd/sdl/output.cpp @@ -11,6 +11,7 @@ #include #include #include +#include // MAME headers #include "emu.h" @@ -32,12 +33,6 @@ */ -#ifdef PTR64 -#define PID_FMT "%ld" -#else -#define PID_FMT "%d" -#endif - //============================================================ // TYPEDEFS //============================================================ @@ -83,7 +78,7 @@ bool sdl_osd_interface::output_init() output = fdopen(fildes, "w"); osd_printf_verbose("output: opened output notifier file %s\n", SDLMAME_OUTPUT); - fprintf(output, "MAME " PID_FMT " START %s\n", osd_getpid(), this->machine().system().name); + fprintf(output, "MAME %" PRIxPTR " START %s\n", osd_getpid(), this->machine().system().name); fflush(output); } @@ -100,7 +95,7 @@ void sdl_osd_interface::output_exit() { if (output != NULL) { - fprintf(output, "MAME " PID_FMT " STOP %s\n", osd_getpid(), machine().system().name); + fprintf(output, "MAME %" PRIxPTR " STOP %s\n", osd_getpid(), machine().system().name); fflush(output); fclose(output); output = NULL; @@ -116,7 +111,7 @@ static void notifier_callback(const char *outname, INT32 value, void *param) { if (output != NULL) { - fprintf(output, "OUT " PID_FMT " %s %d\n", osd_getpid(), outname, value); + fprintf(output, "OUT %" PRIxPTR " %s %d\n", osd_getpid(), outname, value); fflush(output); } }