# HG changeset patch # User diego # Date 1152654345 0 # Node ID 2a0c729ac64030fa6f81645dacb5ce6ea2536220 # Parent de5e5e04a33a10c49645016641923ef357cfd585 CONFIG_WIN32 implies MinGW and Cygwin and possibly more, so use just CONFIG_MINGW or __MINGW32__ instead. diff -r de5e5e04a33a -r 2a0c729ac640 file.c --- a/file.c Tue Jul 11 00:53:55 2006 +0000 +++ b/file.c Tue Jul 11 21:45:45 2006 +0000 @@ -18,14 +18,14 @@ */ #include "avformat.h" #include -#ifndef CONFIG_WIN32 +#ifndef __MINGW32__ #include #include #include #else #include #define open(fname,oflag,pmode) _open(fname,oflag,pmode) -#endif /* CONFIG_WIN32 */ +#endif /* __MINGW32__ */ /* standard file protocol */ @@ -44,7 +44,7 @@ } else { access = O_RDONLY; } -#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__) +#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__) access |= O_BINARY; #endif fd = open(filename, access, 0666); @@ -70,7 +70,7 @@ static offset_t file_seek(URLContext *h, offset_t pos, int whence) { int fd = (size_t)h->priv_data; -#if defined(CONFIG_WIN32) && !defined(__CYGWIN__) +#if defined(__MINGW32__) return _lseeki64(fd, pos, whence); #else return lseek(fd, pos, whence); @@ -103,7 +103,7 @@ } else { fd = 0; } -#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__) +#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__) setmode(fd, O_BINARY); #endif h->priv_data = (void *)(size_t)fd; diff -r de5e5e04a33a -r 2a0c729ac640 os_support.c --- a/os_support.c Tue Jul 11 00:53:55 2006 +0000 +++ b/os_support.c Tue Jul 11 21:45:45 2006 +0000 @@ -20,7 +20,7 @@ #include "avformat.h" #if defined(CONFIG_WINCE) /* Skip includes on WinCE. */ -#elif defined(CONFIG_WIN32) +#elif defined(__MINGW32__) #include #include #elif defined(CONFIG_OS2) @@ -40,7 +40,7 @@ { #if defined(CONFIG_WINCE) return timeGetTime() * int64_t_C(1000); -#elif defined(CONFIG_WIN32) +#elif defined(__MINGW32__) struct timeb tb; _ftime(&tb); return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);