From ac1cfa62f303739a10f9d6f07687009a2216bea2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 30 Oct 2016 03:33:35 +0100 Subject: [PATCH] C89_BUILD error fixes --- file_path_special.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/file_path_special.c b/file_path_special.c index 4fbdb0f2f5..41b366c888 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -202,17 +202,24 @@ bool fill_pathname_application_data(char *s, size_t len) #if !defined(RARCH_CONSOLE) void fill_pathname_application_path(char *s, size_t len) { + size_t i; #ifdef __APPLE__ CFBundleRef bundle = CFBundleGetMainBundle(); #endif - size_t i; +#ifdef _WIN32 + DWORD ret +#endif +#ifdef __HAIKU__ + image_info info; + int32_t cookie = 0; +#endif (void)i; if (!len) return; #ifdef _WIN32 - DWORD ret = GetModuleFileName(GetModuleHandle(NULL), s, len - 1); + ret = GetModuleFileName(GetModuleHandle(NULL), s, len - 1); s[ret] = '\0'; #elif defined(__APPLE__) if (bundle) @@ -227,9 +234,6 @@ void fill_pathname_application_path(char *s, size_t len) return; } #elif defined(__HAIKU__) - image_info info; - int32 cookie = 0; - while (get_next_image_info(0, &cookie, &info) == B_OK) { if (info.type == B_APP_IMAGE)