X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=libhb%2Fports.c;h=2e6b65329a9de6dde936a98c01b81bcc5a1c7114;hb=c593146bf3fab6290c71cbbb974e0a756e43f5e0;hp=1d2c4923f405b598c0e306d937c5e3479d354d01;hpb=2327fee8183124631ba4b43e0b35f984e1b85a3a;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/ports.c b/libhb/ports.c index 1d2c4923..2e6b6532 100644 --- a/libhb/ports.c +++ b/libhb/ports.c @@ -31,6 +31,11 @@ #include #endif +#ifdef SYS_MINGW +#include +#include +#endif + #ifdef SYS_SunOS #include #endif @@ -39,15 +44,15 @@ #include -//#ifdef SYS_CYGWIN -//#include -//#include -//#else +#ifdef SYS_MINGW +#include +#include +#else #include #include #include #include -//#endif +#endif #include "hb.h" @@ -97,7 +102,7 @@ void hb_snooze( int delay ) snooze( 1000 * delay ); #elif defined( SYS_DARWIN ) || defined( SYS_LINUX ) || defined( SYS_FREEBSD) || defined( SYS_SunOS ) usleep( 1000 * delay ); -#elif defined( SYS_CYGWIN ) +#elif defined( SYS_CYGWIN ) || defined( SYS_MINGW ) Sleep( delay ); #endif } @@ -119,7 +124,7 @@ int hb_get_cpu_count() } cpu_count = 1; -#if defined(SYS_CYGWIN) +#if defined(SYS_CYGWIN) || defined(SYS_MINGW) SYSTEM_INFO cpuinfo; GetSystemInfo( &cpuinfo ); cpu_count = cpuinfo.dwNumberOfProcessors; @@ -181,7 +186,7 @@ void hb_get_tempory_directory( hb_handle_t * h, char path[512] ) char base[512]; /* Create the base */ -#ifdef SYS_CYGWIN +#if defined( SYS_CYGWIN ) || defined( SYS_MINGW ) char *p; int i_size = GetTempPath( 512, base ); if( i_size <= 0 || i_size >= 512 ) @@ -227,11 +232,11 @@ void hb_get_tempory_filename( hb_handle_t * h, char name[1024], ***********************************************************************/ void hb_mkdir( char * name ) { -//#ifdef SYS_CYGWIN -// mkdir( name ); -//#else +#ifdef SYS_MINGW + mkdir( name ); +#else mkdir( name, 0755 ); -//#endif +#endif } /************************************************************************