]> git.sesse.net Git - vlc/commitdiff
* src/extras/libc.c: Compilation fix for non-Win32 platforms.
authorChristophe Massiot <massiot@videolan.org>
Mon, 22 Aug 2005 18:22:55 +0000 (18:22 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 22 Aug 2005 18:22:55 +0000 (18:22 +0000)
include/vlc_common.h
src/extras/libc.c

index f2e3304c25c13da1bac3ae3ffd85e2ea49241e86..544f8dc475e6711f0362ea749bad7e48f213d098 100644 (file)
@@ -932,15 +932,9 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #   endif
 #endif
 
-#if defined(WIN32) || defined(UNDER_CE)
     VLC_EXPORT( void *, vlc_opendir_wrapper, ( const char * ) );
     VLC_EXPORT( struct dirent *, vlc_readdir_wrapper, ( void * ) );
     VLC_EXPORT( int, vlc_closedir_wrapper, ( void * ) );
-#else
-#   define vlc_opendir_wrapper opendir
-#   define vlc_readdir_wrapper readdir
-#   define vlc_closedir_wrapper closedir
-#endif
 
 /* Format type specifiers for 64 bits numbers */
 #if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE))
index 259fec68c2d0cea12a064841b65040da273c6d84..68b9177d9a9cfddf31b8e5d0f7be4588dd18758f 100644 (file)
@@ -422,6 +422,19 @@ int vlc_closedir_wrapper( void *_p_dir )
     free( p_dir );
     return 0;
 }
+#else
+void *vlc_opendir_wrapper( const char *psz_path )
+{
+    return (void *)opendir( psz_path );
+}
+struct dirent *vlc_readdir_wrapper( void *_p_dir )
+{
+    return readdir( (DIR *)_p_dir );
+}
+int vlc_closedir_wrapper( void *_p_dir )
+{
+    return closedir( (DIR *)_p_dir );
+}
 #endif
 
 /*****************************************************************************