Discussion:
[libdvdcss-devel] [PATCH] build: Replace system-specific ifdeffery by proper sys/uio.h check
Diego Biurrun
2013-02-13 23:10:21 UTC
Permalink
Signed-off-by: Diego Biurrun <***@biurrun.de>
---
configure.ac | 2 +-
src/device.c | 6 ------
src/device.h | 4 +++-
3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9c89494..dac549f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T

-AC_CHECK_HEADERS(unistd.h sys/param.h limits.h pwd.h errno.h)
+AC_CHECK_HEADERS(unistd.h sys/param.h sys/uio.h limits.h pwd.h errno.h)

dnl
dnl Check the operating system
diff --git a/src/device.c b/src/device.c
index e8042f4..d8ea194 100644
--- a/src/device.c
+++ b/src/device.c
@@ -49,12 +49,6 @@
# include <limits.h>
#endif

-#if defined( WIN32 ) && !defined( __CYGWIN__ )
-# include <io.h> /* read() */
-#else
-# include <sys/uio.h> /* struct iovec */
-#endif
-
#ifdef DARWIN_DVD_IOCTL
# include <paths.h>
# include <CoreFoundation/CoreFoundation.h>
diff --git a/src/device.h b/src/device.h
index 9ad24b0..fd58066 100644
--- a/src/device.h
+++ b/src/device.h
@@ -26,10 +26,12 @@
#ifndef DVDCSS_DEVICE_H
#define DVDCSS_DEVICE_H

+#include "config.h"
+
/*****************************************************************************
* iovec structure: vectored data entry
*****************************************************************************/
-#if defined( WIN32 ) && !defined( __CYGWIN__ )
+#ifndef HAVE_SYS_UIO_H
# include <io.h> /* read() */
struct iovec
{
--
1.7.9.5
Diego Biurrun
2013-02-13 23:42:52 UTC
Permalink
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Thu Feb 14 00:10:21 2013 +0100| [c5ef915232b096cbe750465066089bf926eea22a] | committer: Jean-Baptiste Kempf

build: Replace system-specific ifdeffery by proper sys/uio.h check
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=c5ef915232b096cbe750465066089bf926eea22a
---

configure.ac | 2 +-
src/device.c | 6 ------
src/device.h | 4 +++-
3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index d938d64..8bc7cd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T

-AC_CHECK_HEADERS(unistd.h sys/param.h limits.h pwd.h errno.h)
+AC_CHECK_HEADERS(unistd.h sys/param.h sys/uio.h limits.h pwd.h errno.h)

dnl
dnl Check the operating system
diff --git a/src/device.c b/src/device.c
index e8042f4..d8ea194 100644
--- a/src/device.c
+++ b/src/device.c
@@ -49,12 +49,6 @@
# include <limits.h>
#endif

-#if defined( WIN32 ) && !defined( __CYGWIN__ )
-# include <io.h> /* read() */
-#else
-# include <sys/uio.h> /* struct iovec */
-#endif
-
#ifdef DARWIN_DVD_IOCTL
# include <paths.h>
# include <CoreFoundation/CoreFoundation.h>
diff --git a/src/device.h b/src/device.h
index 9ad24b0..fd58066 100644
--- a/src/device.h
+++ b/src/device.h
@@ -26,10 +26,12 @@
#ifndef DVDCSS_DEVICE_H
#define DVDCSS_DEVICE_H

+#include "config.h"
+
/*****************************************************************************
* iovec structure: vectored data entry
*****************************************************************************/
-#if defined( WIN32 ) && !defined( __CYGWIN__ )
+#ifndef HAVE_SYS_UIO_H
# include <io.h> /* read() */
struct iovec
{

Loading...