summaryrefslogtreecommitdiffstats
path: root/stream/stream_vcd.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-13 16:23:55 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-13 16:23:55 +0000
commit4d644f513c841eaf4617edffb348338a798d37be (patch)
tree2c89ad5e6bd82b9f8a97170d547d4988bae78fe3 /stream/stream_vcd.c
parent8322f0aef1f97a0b6377fca57ee5131b143e67f6 (diff)
downloadmpv-4d644f513c841eaf4617edffb348338a798d37be.tar.bz2
mpv-4d644f513c841eaf4617edffb348338a798d37be.tar.xz
Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_vcd.c')
-rw-r--r--stream/stream_vcd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c
index 4202a9786d..34844bcea9 100644
--- a/stream/stream_vcd.c
+++ b/stream/stream_vcd.c
@@ -1,7 +1,7 @@
#include "config.h"
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
#endif
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
-#ifndef WIN32
+#if !defined(__MINGW32__) && !defined(__CYGWIN__)
#include <sys/ioctl.h>
#endif
#include <errno.h>
@@ -23,7 +23,7 @@
#include "vcd_read_fbsd.h"
#elif defined(__APPLE__)
#include "vcd_read_darwin.h"
-#elif defined(WIN32)
+#elif defined(__MINGW32__) || defined(__CYGWIN__)
#include "vcd_read_win32.h"
#else
#include "vcd_read.h"
@@ -81,13 +81,13 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
int bsize = VCD_SECTOR_SIZE;
#endif
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
HANDLE hd;
char device[] = "\\\\.\\?:";
#endif
if(mode != STREAM_READ
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
|| GetVersion() > 0x80000000 // Win9x
#endif
) {
@@ -102,7 +102,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
p->device = strdup(DEFAULT_CDROM_DEVICE);
}
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
device[4] = p->device[0];
/* open() can't be used for devices so do it the complicated way */
hd = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL,