diff dvd_input.c @ 185:36777e6346c5 src

First update for Win32/msvc support
author tchamp
date Tue, 29 Apr 2003 19:31:37 +0000
parents b0aa6f7931c0
children 5ee9de9e2347
line wrap: on
line diff
--- a/dvd_input.c	Tue Apr 29 15:25:20 2003 +0000
+++ b/dvd_input.c	Tue Apr 29 19:31:37 2003 +0000
@@ -24,9 +24,18 @@
 #include <fcntl.h>
 #include <unistd.h>
 
+#include <dlfcn.h>
+
 #include "dvd_reader.h"
 #include "dvd_input.h"
 
+
+#ifndef _MSC_VER
+#define LIBDVDCSS_NAME = "libdvdcss.so.2"
+#else
+#define LIBDVDCSS_NAME = "libdvdcss.dll"
+#endif
+
 /* The function pointers that is the exported interface of this file. */
 dvd_input_t (*dvdinput_open)  (const char *);
 int         (*dvdinput_close) (dvd_input_t);
@@ -45,8 +54,10 @@
 #define DVDcss_read    dvdcss_read
 #define DVDcss_error   dvdcss_error
 #else
+
 /* dlopening libdvdcss */
 #include <dlfcn.h>
+
 typedef struct dvdcss_s *dvdcss_handle;
 static dvdcss_handle (*DVDcss_open)  (const char *);
 static int           (*DVDcss_close) (dvdcss_handle);
@@ -274,8 +285,13 @@
 
 #else
   /* dlopening libdvdcss */
+
+#ifndef _MSC_VER
   dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
-  
+#else
+  dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
+#endif
+
   if(dvdcss_library != NULL) {
 #if defined(__OpenBSD__) && !defined(__ELF__)
 #define U_S "_"