From 883cc45e4791c8f796de86e31fe72e5a6deae709 Mon Sep 17 00:00:00 2001 From: Tim Champagne Date: Tue, 6 May 2003 14:02:24 +0000 Subject: This is some general Win32 cleanup and getting ready for DVD support. CVS patchset: 4779 CVS date: 2003/05/06 14:02:24 --- src/input/media_helper.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/input/media_helper.c') diff --git a/src/input/media_helper.c b/src/input/media_helper.c index 8c71e09f7..5d387bb44 100644 --- a/src/input/media_helper.c +++ b/src/input/media_helper.c @@ -27,9 +27,13 @@ #include #include #include + +#ifndef WIN32 #include -#include #include +#endif + +#include #include #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) @@ -38,6 +42,7 @@ #include #elif defined(HAVE_SYS_CDIO_H) #include +#elif WIN32 #else #warning "This might not compile due to missing cdrom ioctls" #endif @@ -47,6 +52,7 @@ static int media_umount_media(char *device) { +#ifndef WIN32 char *argv[10]; int i; pid_t pid; @@ -71,11 +77,17 @@ static int media_umount_media(char *device) } while(1); return -1; +#else + return 0; +#endif /* WIN32 */ } int media_eject_media (char *device) { + +#ifndef WIN32 int ret, status; int fd; +#endif /* WIN32 */ /* printf("input_dvd: Eject Device %s current device %s opened=%d handle=%p trying...\n",device, this->current_dvd_device, this->opened, this->dvdnav); */ media_umount_media(device); @@ -83,6 +95,8 @@ int media_eject_media (char *device) { printf("ipnut_dvd: umount result: %s\n", strerror(errno)); ***********/ + +#ifndef WIN32 if ((fd = open (device, O_RDONLY|O_NONBLOCK)) > -1) { #if defined (__linux__) @@ -130,5 +144,8 @@ int media_eject_media (char *device) { printf("input_dvd: Device %s failed to open during eject calls\n",device); } return 1; +#else + return 0; +#endif /* WIN32 */ } -- cgit v1.2.3