shithub: libdvdcss

Download patch

ref: 077025bf61d99c66bab6cea4e89ed85c749e126b
parent: bdd3f4c9571ce12e97a3fb35ceff80b26648aa35
author: Diego Biurrun <diego@biurrun.de>
date: Mon Aug 2 11:41:14 EDT 2010

Add multiple inclusion guards to header files

Most header files in libdvdcss lack multiple inclusion guards, although they are
a sensible thing to have for header files. This adds them where currently missing.





--- a/src/common.h
+++ b/src/common.h
@@ -24,6 +24,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
 
+#ifndef DVDCSS_COMMON_H
+#define DVDCSS_COMMON_H
+
 /*****************************************************************************
  * Basic types definitions
  *****************************************************************************/
@@ -79,3 +82,4 @@
 
 #endif
 
+#endif /* DVDCSS_COMMON_H */
--- a/src/css.h
+++ b/src/css.h
@@ -26,6 +26,10 @@
  * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
+
+#ifndef DVDCSS_CSS_H
+#define DVDCSS_CSS_H
+
 #define KEY_SIZE 5
 
 typedef uint8_t dvd_key_t[KEY_SIZE];
@@ -54,3 +58,4 @@
 int   _dvdcss_titlekey    ( dvdcss_t, int , dvd_key_t );
 int   _dvdcss_unscramble  ( uint8_t *, uint8_t * );
 
+#endif /* DVDCSS_CSS_H */
--- a/src/csstables.h
+++ b/src/csstables.h
@@ -29,6 +29,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
 
+#ifndef DVDCSS_CSSTABLES_H
+#define DVDCSS_CSSTABLES_H
 
 static uint8_t p_css_tab1[ 256 ] =
 {
@@ -390,3 +392,4 @@
     0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81
 };
 
+#endif /* DVDCSS_CSSTABLES_H */
--- a/src/device.h
+++ b/src/device.h
@@ -23,6 +23,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
 
+#ifndef DVDCSS_DEVICE_H
+#define DVDCSS_DEVICE_H
+
 /*****************************************************************************
  * iovec structure: vectored data entry
  *****************************************************************************/
@@ -56,3 +59,4 @@
 int _dvdcss_raw_open     ( dvdcss_t, char const * );
 #endif
 
+#endif /* DVDCSS_DEVICE_H */
--- a/src/ioctl.h
+++ b/src/ioctl.h
@@ -21,6 +21,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
 
+#ifndef DVDCSS_IOCTL_H
+#define DVDCSS_IOCTL_H
+
 int ioctl_ReadCopyright     ( int, int, int * );
 int ioctl_ReadDiscKey       ( int, int *, uint8_t * );
 int ioctl_ReadTitleKey      ( int, int *, int, uint8_t * );
@@ -427,3 +430,5 @@
 #pragma pack()
 
 #endif
+
+#endif /* DVDCSS_IOCTL_H */
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -22,6 +22,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *****************************************************************************/
 
+#ifndef DVDCSS_LIBDVDCSS_H
+#define DVDCSS_LIBDVDCSS_H
+
 struct iovec;
 
 /*****************************************************************************
@@ -102,3 +105,4 @@
 
 void _print_error ( dvdcss_t, char * );
 
+#endif /* DVDCSS_LIBDVDCSS_H */