diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2015-07-25 20:58:29 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2015-07-25 23:14:51 +1000 |
commit | ecb4a760958b3acaf1e441536305a25594ceb9b7 (patch) | |
tree | af40c7fa4e7714e79153d8c24b7889d9fb3fc222 /libs | |
parent | 544be3ebe8afb2a45b8c9855d9777b29ad22f43b (diff) |
Use g_open instead of ::open in translation related utility functions
This is for portability on Windows
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/globals.cc | 7 |
1 files 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 <errno.h> #include <time.h> +#include <glib.h> +#include <glib/gstdio.h> + #ifdef PLATFORM_WINDOWS #include <windows.h> // 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; |