shithub: libdvdcss

Download patch

ref: a918cb9b7ac6d8c213e8c511e66bea7a4d88ebbc
parent: c500fe5227012ac04ec0b91c6c29606bad246839
author: Diego Biurrun <[email protected]>
date: Fri Nov 14 16:00:38 EST 2014

Unconditionally use limits.h.

The header is available in all toolchains we care about.

--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,7 @@
 AC_C_INLINE
 AC_TYPE_SIZE_T
 
-AC_CHECK_HEADERS([unistd.h sys/param.h sys/uio.h limits.h pwd.h]dnl
+AC_CHECK_HEADERS([unistd.h sys/param.h sys/uio.h pwd.h]dnl
   [errno.h sys/types.h sys/stat.h fcntl.h io.h])
 
 AC_CHECK_DECL([O_BINARY], [],
--- a/src/css.c
+++ b/src/css.c
@@ -35,6 +35,7 @@
  *****************************************************************************/
 #include "config.h"
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,10 +47,6 @@
 #   include <unistd.h>
 #endif
 #include <fcntl.h>
-
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
 
 #include "dvdcss/dvdcss.h"
 
--- a/src/device.c
+++ b/src/device.c
@@ -27,6 +27,7 @@
  *****************************************************************************/
 #include "config.h"
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -42,10 +43,6 @@
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
 #endif
 
 #ifdef DARWIN_DVD_IOCTL
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -97,6 +97,7 @@
  */
 #include "config.h"
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -113,10 +114,6 @@
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
 #endif
 
 #if defined(_WIN32_IE) && _WIN32_IE >= 0x500
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -24,11 +24,7 @@
 #ifndef DVDCSS_LIBDVDCSS_H
 #define DVDCSS_LIBDVDCSS_H
 
-#include "config.h"
-
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
+#include <limits.h>
 
 #include "dvdcss/dvdcss.h"
 #include "css.h"