mirror of
https://github.com/videolan/vlc.git
synced 2025-01-10 17:58:22 +08:00
Return DIR from utf8_open to avoid casting bugs
This commit is contained in:
parent
a46cc88f28
commit
b8ddca0134
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user