]> git.sesse.net Git - mlt/commitdiff
Fix build for querylocale() on OS X.
authorDan Dennedy <dan@dennedy.org>
Mon, 11 Jul 2011 06:09:23 +0000 (23:09 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 11 Jul 2011 06:09:23 +0000 (23:09 -0700)
src/framework/mlt_properties.c
src/framework/mlt_property.c

index 810de35b6b5177d1b0f636d4daf2a01568bd0825..02e8a7d9d892d16964194aa2887de982bbb9ba41 100644 (file)
@@ -161,10 +161,12 @@ const char* mlt_properties_get_lcnumeric( mlt_properties self )
 
        if ( list->locale )
        {
-#ifdef querylocale
+#if defined(__DARWIN__)
                result = querylocale( LC_NUMERIC, list->locale );
-#else
+#elif defined(__linux__)
                result = list->locale->__names[ LC_NUMERIC ];
+#else
+               // TODO: not yet sure what to do on other platforms
 #endif
        }
        return result;
index cf4e945f50320e92810a61eb3b13c1780666ff50..7a495fbc92595cb31d19a3741de9e7e23db26438 100644 (file)
@@ -498,10 +498,13 @@ char *mlt_property_get_string_l( mlt_property self, locale_t locale )
        {
                // TODO: when glibc gets sprintf_l, start using it! For now, hack on setlocale.
                // Save the current locale
-#ifdef querylocale
+#if defined(__DARWIN__)
                const char *localename = querylocale( LC_NUMERIC, locale );
-#else
+#elif defined(__linux__)
                const char *localename = locale->__names[ LC_NUMERIC ];
+#else
+               // TODO: not yet sure what to do on other platforms
+               const char *localename = "";
 #endif
                // Protect damaging the global locale from a temporary locale on another thread.
                pthread_mutex_lock( &self->mutex );