Diego Biurrun
2013-01-29 19:42:24 UTC
Also drop related unnecessary direct.h #include and configure.ac check.
---
This is tested on Linux, Cygwin and MinGW. I suspect somebody will have
to test it on MSVC.
configure.ac | 3 ---
src/libdvdcss.c | 6 +-----
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 44ff25c..a4a7b6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,9 +58,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/src/libdvdcss.c b/src/libdvdcss.c
index 01eafef..877abf5 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"
@@ -238,7 +234,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 );
---
This is tested on Linux, Cygwin and MinGW. I suspect somebody will have
to test it on MSVC.
configure.ac | 3 ---
src/libdvdcss.c | 6 +-----
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 44ff25c..a4a7b6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,9 +58,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/src/libdvdcss.c b/src/libdvdcss.c
index 01eafef..877abf5 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"
@@ -238,7 +234,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
1.7.9.5