From ecb4a760958b3acaf1e441536305a25594ceb9b7 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 25 Jul 2015 20:58:29 +1000 Subject: [PATCH] Use g_open instead of ::open in translation related utility functions This is for portability on Windows --- libs/ardour/globals.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index fa6f833d94..fea1de2c55 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -37,6 +37,9 @@ #include #include +#include +#include + #ifdef PLATFORM_WINDOWS #include // for LARGE_INTEGER #endif @@ -653,7 +656,7 @@ ARDOUR::translation_enable_path () bool ARDOUR::translations_are_enabled () { - int fd = ::open (ARDOUR::translation_enable_path().c_str(), O_RDONLY); + int fd = g_open (ARDOUR::translation_enable_path().c_str(), O_RDONLY, 0444); if (fd < 0) { return translate_by_default; @@ -675,7 +678,7 @@ bool ARDOUR::set_translations_enabled (bool yn) { string i18n_enabler = ARDOUR::translation_enable_path(); - int fd = ::open (i18n_enabler.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644); + int fd = g_open (i18n_enabler.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644); if (fd < 0) { return false; -- 2.30.2