]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Attempt to use wide directory indexing on Win32
[vlc] / include / vlc_common.h
index 70956f56e8553f71160ce15512cde8233f4e558a..e131edc376826561e0d02f366ba485675dec1c70 100644 (file)
@@ -969,9 +969,18 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #   endif
 #endif
 
-VLC_INTERNAL( void *, vlc_opendir_wrapper, ( const char * ) );
-VLC_INTERNAL( struct dirent *, vlc_readdir_wrapper, ( void * ) );
-VLC_INTERNAL( int, vlc_closedir_wrapper, ( void * ) );
+#if defined (WIN32)
+#   include <dirent.h>
+VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) );
+VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) );
+VLC_INTERNAL( int, vlc_wclosedir, ( void * ) );
+#   define opendir Use_utf8_opendir_or_vlc_wopendir_instead!
+#   define readdir Use_utf8_readdir_or_vlc_wreaddir_instead!
+#   define closedir vlc_wclosedir
+#   define _wopendir vlc_wopendir
+#   define _wreaddir vlc_wreaddir
+#   define _wclosedir vlc_wclosedir
+#endif
 
 /* Format type specifiers for 64 bits numbers */
 #if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE))