Commit b8ddca01 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Return DIR from utf8_open to avoid casting bugs

parent a46cc88f
......@@ -27,6 +27,7 @@
#include <stdarg.h>
#include <sys/types.h>
#include <dirent.h>
VLC_EXPORT( void, LocaleFree, ( const char * ) );
VLC_EXPORT( char *, FromLocale, ( const char * ) );
......@@ -35,7 +36,7 @@ VLC_EXPORT( char *, ToLocale, ( const char * ) );
VLC_EXPORT( int, utf8_open, ( const char *filename, int flags, mode_t mode ) );
VLC_EXPORT( FILE *, utf8_fopen, ( const char *filename, const char *mode ) );
VLC_EXPORT( void *, utf8_opendir, ( const char *dirname ) );
VLC_EXPORT( DIR *, utf8_opendir, ( const char *dirname ) );
VLC_EXPORT( char *, utf8_readdir, ( void *dir ) );
VLC_EXPORT( int, utf8_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
......
......@@ -466,7 +466,7 @@ struct module_symbols_t
void *vlc_HashInsert_deprecated;
void *vlc_HashLookup_deprecated;
void *vlc_HashRetrieve_deprecated;
void * (*utf8_opendir_inner) (const char *dirname);
DIR * (*utf8_opendir_inner) (const char *dirname);
FILE * (*utf8_fopen_inner) (const char *filename, const char *mode);
char * (*utf8_readdir_inner) (void *dir);
int (*utf8_stat_inner) (const char *filename, struct stat *buf);
......
......@@ -427,7 +427,7 @@ int utf8_mkdir( const char *dirname )
}
void *utf8_opendir( const char *dirname )
DIR *utf8_opendir( const char *dirname )
{
/* TODO: support for WinNT non-ACP filenames */
const char *local_name = ToLocale( dirname );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment