Commit 30286476 authored by Rafaël Carré's avatar Rafaël Carré

skins2: use vlc_mkdir

parent 71e0080e
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_fs.h>
#include "theme_loader.hpp" #include "theme_loader.hpp"
#include "theme.hpp" #include "theme.hpp"
#include "../parser/builder.hpp" #include "../parser/builder.hpp"
...@@ -39,9 +46,6 @@ ...@@ -39,9 +46,6 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
#if defined( _WIN64 )
# include <direct.h>
#endif
#if defined( HAVE_ZLIB_H ) #if defined( HAVE_ZLIB_H )
# include <zlib.h> # include <zlib.h>
...@@ -656,10 +660,6 @@ int getoct( char *p, int width ) ...@@ -656,10 +660,6 @@ int getoct( char *p, int width )
#endif #endif
#ifdef WIN32
# define mkdir(dirname,mode) _mkdir(dirname)
#endif
/* Recursive make directory /* Recursive make directory
* Abort if you get an ENOENT errno somewhere in the middle * Abort if you get an ENOENT errno somewhere in the middle
* e.g. ignore error "mkdir on existing directory" * e.g. ignore error "mkdir on existing directory"
...@@ -682,7 +682,7 @@ int makedir( const char *newdir ) ...@@ -682,7 +682,7 @@ int makedir( const char *newdir )
buffer[len-1] = '\0'; buffer[len-1] = '\0';
} }
if( mkdir( buffer, 0775 ) == 0 ) if( vlc_mkdir( buffer, 0775 ) == 0 )
{ {
free( buffer ); free( buffer );
return 1; return 1;
...@@ -696,7 +696,7 @@ int makedir( const char *newdir ) ...@@ -696,7 +696,7 @@ int makedir( const char *newdir )
while( *p && *p != '\\' && *p != '/' ) p++; while( *p && *p != '\\' && *p != '/' ) p++;
hold = *p; hold = *p;
*p = 0; *p = 0;
if( ( mkdir( buffer, 0775 ) == -1 ) && ( errno == ENOENT ) ) if( ( vlc_mkdir( buffer, 0775 ) == -1 ) && ( errno == ENOENT ) )
{ {
fprintf( stderr, "couldn't create directory %s\n", buffer ); fprintf( stderr, "couldn't create directory %s\n", buffer );
free( buffer ); free( buffer );
......
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