]> git.sesse.net Git - vlc/commitdiff
Some WinCE fixes
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 13 Feb 2006 08:36:52 +0000 (08:36 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 13 Feb 2006 08:36:52 +0000 (08:36 +0000)
src/misc/unicode.c

index 8074393ed601b8659b62be2a0d46639345330d84..4b4714a8391fc1a0d828dbf452b89ed483e5602a 100644 (file)
@@ -49,7 +49,7 @@
 # define ASSUME_UTF8 1
 #endif
 
-#if !(defined (WIN32) && defined (ASSUME_UTF8))
+#if !(defined (WIN32) && defined (UNDER_CE) && defined (ASSUME_UTF8))
 # define USE_ICONV 1
 #endif
 
@@ -118,7 +118,7 @@ void LocaleDeinit( void )
 #endif
 }
 
-#ifdef WIN32
+#if defined (WIN32) || defined (UNDER_CE)
 static char *MB2MB( const char *string, UINT fromCP, UINT toCP )
 {
     char *out;
@@ -150,7 +150,7 @@ char *FromLocale( const char *locale )
     if( locale == NULL )
         return NULL;
 
-#ifndef WIN32
+#if !(defined WIN32 || defined (UNDER_CE))
 # ifdef USE_ICONV
     if( from_locale.hd != (vlc_iconv_t)(-1) )
     {
@@ -219,7 +219,7 @@ char *ToLocale( const char *utf8 )
     if( utf8 == NULL )
         return NULL;
 
-#ifndef WIN32
+#if !(defined (WIN32) || defined (UNDER_CE))
 # ifdef USE_ICONV
     if( to_locale.hd != (vlc_iconv_t)(-1) )
     {
@@ -281,7 +281,7 @@ void LocaleFree( const char *str )
  *****************************************************************************/
 FILE *utf8_fopen( const char *filename, const char *mode )
 {
-#if !defined WIN32 /*|| !defined UNICODE*/
+#if !(defined (WIN32) || defined (UNDER_CE))
     const char *local_name = ToLocale( filename );
 
     if( local_name != NULL )
@@ -313,7 +313,7 @@ FILE *utf8_fopen( const char *filename, const char *mode )
  *****************************************************************************/
 int utf8_mkdir( const char *dirname )
 {
-#if defined( UNDER_CE ) || defined( WIN32 )
+#if defined (UNDER_CE) || defined (WIN32)
     wchar_t wname[MAX_PATH];
     char mod[MAX_PATH];
     int i;