[libdvdcss-devel] [PATCH 1/2] build: win32: Surround Windows-specific code by appropriate ifdef

Diego Biurrun diego at biurrun.de
Wed Feb 13 15:15:22 CET 2013


Also drop the now unnecessary direct.h configure.ac check. That header
file is no longer used and always available on Windows.

Signed-off-by: Diego Biurrun <diego at biurrun.de>
---
 configure.ac    |    3 ---
 msvc/config.h   |    1 -
 src/libdvdcss.c |    6 +-----
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c92ce6..d938d64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,9 +48,6 @@ CAN_BUILD_LIBDVDCSS=0
 
 dnl  for windoze
 AC_CHECK_HEADERS(windows.h,[
-  AC_CHECK_HEADERS(direct.h,,,[
-  #include <windows.h>
-  ])
   AC_CHECK_HEADERS(winioctl.h,[
     CAN_BUILD_LIBDVDCSS=1
   ],,[
diff --git a/msvc/config.h b/msvc/config.h
index ac88ea2..5a313ee 100644
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -7,7 +7,6 @@
 /* #undef DVD_STRUCT_IN_SYS_CDIO_H */
 /* #undef DVD_STRUCT_IN_SYS_DVDIO_H */
 /* #undef HAVE_BSD_DVD_STRUCT */
-#define HAVE_DIRECT_H 1
 #define HAVE_DLFCN_H 1
 /* #undef HAVE_DVD_H */
 /* #undef HAVE_INTTYPES_H */
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index b10f598..a5b5bbb 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -120,10 +120,6 @@
 #   include <limits.h>
 #endif
 
-#ifdef HAVE_DIRECT_H
-#   include <direct.h>
-#endif
-
 #include "dvdcss/dvdcss.h"
 
 #include "common.h"
@@ -242,7 +238,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
      */
     if( psz_cache == NULL || psz_cache[0] == '\0' )
     {
-#ifdef HAVE_DIRECT_H
+#if defined(WIN32)
         typedef HRESULT( WINAPI *SHGETFOLDERPATH )
                        ( HWND, int, HANDLE, DWORD, LPTSTR );
 
-- 
1.7.9.5



More information about the libdvdcss-devel mailing list