C89_BUILD error fixes

This commit is contained in:
twinaphex 2016-10-30 03:33:35 +01:00
parent 696abbed83
commit ac1cfa62f3
1 changed files with 9 additions and 5 deletions

View File

@ -202,17 +202,24 @@ bool fill_pathname_application_data(char *s, size_t len)
#if !defined(RARCH_CONSOLE) #if !defined(RARCH_CONSOLE)
void fill_pathname_application_path(char *s, size_t len) void fill_pathname_application_path(char *s, size_t len)
{ {
size_t i;
#ifdef __APPLE__ #ifdef __APPLE__
CFBundleRef bundle = CFBundleGetMainBundle(); CFBundleRef bundle = CFBundleGetMainBundle();
#endif #endif
size_t i; #ifdef _WIN32
DWORD ret
#endif
#ifdef __HAIKU__
image_info info;
int32_t cookie = 0;
#endif
(void)i; (void)i;
if (!len) if (!len)
return; return;
#ifdef _WIN32 #ifdef _WIN32
DWORD ret = GetModuleFileName(GetModuleHandle(NULL), s, len - 1); ret = GetModuleFileName(GetModuleHandle(NULL), s, len - 1);
s[ret] = '\0'; s[ret] = '\0';
#elif defined(__APPLE__) #elif defined(__APPLE__)
if (bundle) if (bundle)
@ -227,9 +234,6 @@ void fill_pathname_application_path(char *s, size_t len)
return; return;
} }
#elif defined(__HAIKU__) #elif defined(__HAIKU__)
image_info info;
int32 cookie = 0;
while (get_next_image_info(0, &cookie, &info) == B_OK) while (get_next_image_info(0, &cookie, &info) == B_OK)
{ {
if (info.type == B_APP_IMAGE) if (info.type == B_APP_IMAGE)