]> git.sesse.net Git - mlt/commitdiff
Fix build on new locale stuff when not Linux or OS X.
authorDan Dennedy <dan@dennedy.org>
Tue, 12 Jul 2011 01:00:23 +0000 (18:00 -0700)
committerDan Dennedy <dan@dennedy.org>
Tue, 12 Jul 2011 01:00:23 +0000 (18:00 -0700)
src/framework/mlt_properties.c
src/framework/mlt_property.c
src/framework/mlt_property.h

index 02e8a7d9d892d16964194aa2887de982bbb9ba41..e3c28a5ff7ce9e211c7d83069c0609b6a10a85fe 100644 (file)
@@ -136,9 +136,11 @@ int mlt_properties_set_lcnumeric( mlt_properties self, const char *locale )
        {
                property_list *list = self->local;
 
+#if defined(__linux__) || defined(__DARWIN__)
                if ( list->locale )
                        freelocale( list->locale );
                list->locale = newlocale( LC_NUMERIC, locale, NULL );
+#endif
                error = list->locale == NULL;
        }
        else
@@ -1315,9 +1317,11 @@ void mlt_properties_close( mlt_properties self )
                                free( list->name[ index ] );
                        }
 
+#if defined(__linux__) || defined(__DARWIN__)
                        // Cleanup locale
                        if ( list->locale )
                                freelocale( list->locale );
+#endif
 
                        // Clear up the list
                        pthread_mutex_destroy( &list->mutex );
index 7a495fbc92595cb31d19a3741de9e7e23db26438..5242cf4690029dbf9e9c5c7070640905dd99d864 100644 (file)
@@ -354,8 +354,10 @@ double mlt_property_get_double_l( mlt_property self, locale_t locale )
                return ( double )self->prop_position;
        else if ( self->types & mlt_prop_int64 )
                return ( double )self->prop_int64;
+#if defined(__linux__) || defined(__DARWIN__)
        else if ( locale && ( self->types & mlt_prop_string ) && self->prop_string )
                return strtod_l( self->prop_string, NULL, locale );
+#endif
        else if ( ( self->types & mlt_prop_string ) && self->prop_string )
                return strtod( self->prop_string, NULL );
        return 0;
index fcf075401bd31fb48bff235f20408e94009b5129..b195a50092c1a7b5ccd21404e6c5fd718baf7cc2 100644 (file)
 #define _MLT_PROPERTY_H_
 
 #include "mlt_types.h"
+
+#if defined(__linux__) || defined(__DARWIN__)
 #include <xlocale.h>
+#else
+typedef void* locale_t;
+#endif
 
 extern mlt_property mlt_property_init( );
 extern int mlt_property_set_int( mlt_property self, int value );