Skip to content

Commit 46a9610

Browse files
author
xiaobai
committed
ohos: follows the C89 standard
1 parent 6db3702 commit 46a9610

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void OS_CleanupThreadData(void)
7272
{
7373
#ifdef __ANDROID__
7474
DetachThreadLinux(NULL);
75-
#elifdef __OHOS__
75+
#elif defined(__OHOS__)
7676
DetachThreadLinux(NULL);
7777
#else
7878
int old_cancel_state, old_cancel_type;

frontend/drivers/platform_unix.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static char app_dir[DIR_MAX_LENGTH];
131131
unsigned storage_permissions = 0;
132132
struct android_app *g_android = NULL;
133133
static uint8_t g_platform_android_flags = 0;
134-
#elif __OHOS__
134+
#elif defined(__OHOS__)
135135
static pthread_key_t thread_key;
136136
static char app_dir[DIR_MAX_LENGTH];
137137
unsigned storage_permissions = 0;
@@ -732,7 +732,7 @@ JNIEXPORT void JNICALL Java_com_retroarch_browser_retroactivity_RetroActivityCom
732732
}
733733
#endif
734734
}
735-
#elif __OHOS__
735+
#elif defined(__OHOS__)
736736

737737
#elif !defined(DINGUX)
738738
static bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val)
@@ -1275,7 +1275,7 @@ static enum frontend_powerstate frontend_unix_get_powerstate(
12751275
*percent = battery_level;
12761276

12771277
ret = (enum frontend_powerstate)powerstate;
1278-
#elif __OHOS__
1278+
#elif defined(__OHOS__)
12791279

12801280
#elif defined(RETROFW)
12811281
*percent = retrofw_get_battery_level(&ret);
@@ -1461,7 +1461,7 @@ static size_t frontend_unix_get_os(char *s,
14611461
int rel;
14621462
frontend_android_get_version(major, minor, &rel);
14631463
_len = strlcpy(s, "Android", len);
1464-
#elif __OHOS__
1464+
#elif defined(__OHOS__)
14651465
*major = 0;
14661466
char buffer[128];
14671467
const char* os = OH_GetDistributionOSName();
@@ -1936,7 +1936,7 @@ static void frontend_unix_get_env(int *argc,
19361936
g_defaults.overlay_enable = false;
19371937
strlcpy(g_defaults.settings_menu, "ozone", sizeof(g_defaults.settings_menu));
19381938
}
1939-
#elif __OHOS__
1939+
#elif defined(__OHOS__)
19401940
int32_t major, minor, rel;
19411941
struct rarch_main_wrap *args = NULL;
19421942
struct ohos_app *ohos_app = (struct ohos_app*)data;
@@ -2505,7 +2505,7 @@ static void frontend_unix_deinit(void *data)
25052505

25062506
static void frontend_unix_init(void *data)
25072507
{
2508-
#ifdef __OHOS__
2508+
#if defined(__OHOS__)
25092509
struct ohos_app* ohos_app = (struct ohos_app*)data;
25102510
slock_lock(ohos_app->mutex);
25112511
ohos_app->running = 1;
@@ -2779,7 +2779,7 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
27792779
FILE_TYPE_DIRECTORY, 0, 0, NULL);
27802780
}
27812781
}
2782-
#elifdef __OHOS__
2782+
#elif defined(__OHOS__)
27832783
menu_entries_append(list,
27842784
g_ohos->startParams->DATADIR,
27852785
msg_hash_to_str(MSG_INTERNAL_STORAGE),
@@ -2882,7 +2882,7 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
28822882

28832883
#ifdef ANDROID
28842884
if (!g_android->is_play_store_build)
2885-
#elifdef __OHOS__
2885+
#elif defined(__OHOS__)
28862886
if (0)
28872887
#else
28882888
if (1)
@@ -3491,7 +3491,7 @@ enum retro_language frontend_unix_get_user_language(void)
34913491
(*env)->ReleaseStringUTFChars(env, jstr, lang_str);
34923492
}
34933493
}
3494-
#elifdef __OHOS__
3494+
#elif defined(__OHOS__)
34953495
if (!g_ohos)
34963496
return RETRO_LANGUAGE_CHINESE_SIMPLIFIED;
34973497
if (!string_is_equal(g_ohos->startParams->Lang, ""))
@@ -4046,7 +4046,7 @@ frontend_ctx_driver_t frontend_ctx_unix = {
40464046
#ifdef ANDROID
40474047
frontend_android_shutdown, /* shutdown */
40484048
frontend_android_get_name, /* get_name */
4049-
#elif __OHOS__
4049+
#elif defined(__OHOS__)
40504050
frontend_ohos_shutdown, /* shutdown */
40514051
frontend_ohos_get_name, /* get_name */
40524052
#else
@@ -4096,7 +4096,7 @@ frontend_ctx_driver_t frontend_ctx_unix = {
40964096
frontend_unix_get_display_type,
40974097
#ifdef ANDROID
40984098
"android", /* ident */
4099-
#elifdef __OHOS__
4099+
#elif defined(__OHOS__)
41004100
"ohos", /* ident */
41014101
#else
41024102
"unix", /* ident */

0 commit comments

Comments
 (0)