[libdvdcss-devel] Unconditionally use limits.h.

Diego Biurrun git at videolan.org
Sun Nov 16 21:37:49 CET 2014


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Nov 14 21:00:38 2014 +0100| [a918cb9b7ac6d8c213e8c511e66bea7a4d88ebbc] | committer: Diego Biurrun

Unconditionally use limits.h.

The header is available in all toolchains we care about.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=a918cb9b7ac6d8c213e8c511e66bea7a4d88ebbc
---

 configure.ac    |    2 +-
 src/css.c       |    5 +----
 src/device.c    |    5 +----
 src/libdvdcss.c |    5 +----
 src/libdvdcss.h |    6 +-----
 5 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b8f79d..f37057f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,7 @@ AC_C_CONST
 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], [],
diff --git a/src/css.c b/src/css.c
index 25c70c0..79cbefe 100644
--- 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>
@@ -47,10 +48,6 @@
 #endif
 #include <fcntl.h>
 
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
-
 #include "dvdcss/dvdcss.h"
 
 #include "common.h"
diff --git a/src/device.c b/src/device.c
index 9d9946c..bcd54e2 100644
--- 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>
@@ -44,10 +45,6 @@
 #   include <unistd.h>
 #endif
 
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
-
 #ifdef DARWIN_DVD_IOCTL
 #   include <paths.h>
 #   include <CoreFoundation/CoreFoundation.h>
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index 89bf6fd..41479b5 100644
--- 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>
@@ -115,10 +116,6 @@
 #   include <unistd.h>
 #endif
 
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
-
 #if defined(_WIN32_IE) && _WIN32_IE >= 0x500
 #   include <shlobj.h>
 #endif
diff --git a/src/libdvdcss.h b/src/libdvdcss.h
index c08fadc..31c15bc 100644
--- 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"



More information about the libdvdcss-devel mailing list