[MPlayer-cvslog] CVS: main/libmpdvdkit2 Makefile, 1.6, 1.7 common.h, 1.7, 1.8 css.c, 1.10, 1.11 device.c, 1.10, 1.11 error.c, 1.7, 1.8 libdvdcss.c, 1.16, 1.17 libdvdcss_changes.diff, 1.4, 1.5
Diego Biurrun CVS
syncmail at mplayerhq.hu
Sun Oct 9 12:18:27 CEST 2005
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/main/libmpdvdkit2
In directory mail:/var2/tmp/cvs-serv12033
Modified Files:
Makefile common.h css.c device.c error.c libdvdcss.c
libdvdcss_changes.diff
Log Message:
Replace unconditional #defines by build system trickery.
This reduces our local diff considerably.
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Makefile 9 Oct 2005 09:53:27 -0000 1.6
+++ Makefile 9 Oct 2005 10:18:24 -0000 1.7
@@ -36,7 +36,12 @@
# -funroll-loops removed, triggered gcc 3.0.4 (3.x?) bug
CFLAGS= -I. $(OPTFLAGS) $(EXTRA_INC)\
-DSYS_LINUX -D__USE_UNIX98 -D_REENTRANT -D_GNU_SOURCE \
- -DHAVE_DVDCSS_DVDCSS_H -DSTDC_HEADERS
+ -DHAVE_DVDCSS_DVDCSS_H -DSTDC_HEADERS -DHAVE_LIMITS_H \
+ -DHAVE_ERRNO_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H \
+
+ifeq ($(TARGET_OS),CYGWIN)
+CFLAGS+=-DSYS_CYGWIN
+endif
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
Index: common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/common.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- common.h 1 Oct 2005 17:58:37 -0000 1.7
+++ common.h 9 Oct 2005 10:18:24 -0000 1.8
@@ -3,9 +3,6 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- *
- * Modified for use with MPlayer, changes contained in libdvdcss_changes.diff.
- * detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
* $Id$
*
* Authors: Samuel Hocevar <sam at via.ecp.fr>
@@ -30,10 +27,21 @@
/*****************************************************************************
* Basic types definitions
*****************************************************************************/
-#include <inttypes.h>
-
-#ifdef __CYGWIN__
-#define SYS_CYGWIN
+#if defined( HAVE_STDINT_H )
+# include <stdint.h>
+#elif defined( HAVE_INTTYPES_H )
+# include <inttypes.h>
+#elif defined( SYS_CYGWIN )
+# include <sys/types.h>
+ /* Cygwin only defines half of these... */
+ typedef u_int8_t uint8_t;
+ typedef u_int32_t uint32_t;
+#else
+ /* Fallback types (very x86-centric, sorry) */
+ typedef unsigned char uint8_t;
+ typedef signed char int8_t;
+ typedef unsigned int uint32_t;
+ typedef signed int int32_t;
#endif
#if defined( WIN32 )
Index: css.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/css.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- css.c 1 Oct 2005 17:58:37 -0000 1.10
+++ css.c 9 Oct 2005 10:18:24 -0000 1.11
@@ -44,9 +44,17 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#endif
#include <fcntl.h>
+
+#ifdef HAVE_LIMITS_H
# include <limits.h>
+#endif
#include "dvdcss.h"
Index: device.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/device.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- device.c 1 Oct 2005 17:58:37 -0000 1.10
+++ device.c 9 Oct 2005 10:18:24 -0000 1.11
@@ -34,12 +34,23 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_ERRNO_H
# include <errno.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
#include <fcntl.h>
+
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
# include <limits.h>
+#endif
#if defined( WIN32 ) && !defined( SYS_CYGWIN )
# include <io.h> /* read() */
Index: error.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/error.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- error.c 1 Oct 2005 17:58:37 -0000 1.7
+++ error.c 9 Oct 2005 10:18:24 -0000 1.8
@@ -28,7 +28,14 @@
#include <stdio.h>
#include <stdlib.h>
+
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
# include <limits.h>
+#endif
#include "dvdcss.h"
Index: libdvdcss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/libdvdcss.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- libdvdcss.c 1 Oct 2005 17:58:37 -0000 1.16
+++ libdvdcss.c 9 Oct 2005 10:18:24 -0000 1.17
@@ -103,10 +103,26 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#ifdef HAVE_PWD_H
+# include <pwd.h>
+#endif
#include <fcntl.h>
#include <errno.h>
+
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
# include <limits.h>
+#endif
+
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif
#include "dvdcss.h"
Index: libdvdcss_changes.diff
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/libdvdcss_changes.diff,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- libdvdcss_changes.diff 1 Oct 2005 17:19:33 -0000 1.4
+++ libdvdcss_changes.diff 9 Oct 2005 10:18:24 -0000 1.5
@@ -1,48 +1,8 @@
---- common.h 2003-06-13 19:33:35.000000000 +0200
-+++ common.h 2005-03-01 07:41:41.000000000 +0100
-@@ -27,21 +27,10 @@
- /*****************************************************************************
- * Basic types definitions
- *****************************************************************************/
--#if defined( HAVE_STDINT_H )
--# include <stdint.h>
--#elif defined( HAVE_INTTYPES_H )
--# include <inttypes.h>
--#elif defined( SYS_CYGWIN )
--# include <sys/types.h>
-- /* Cygwin only defines half of these... */
-- typedef u_int8_t uint8_t;
-- typedef u_int32_t uint32_t;
--#else
-- /* Fallback types (very x86-centric, sorry) */
-- typedef unsigned char uint8_t;
-- typedef signed char int8_t;
-- typedef unsigned int uint32_t;
-- typedef signed int int32_t;
-+#include <inttypes.h>
-+
-+#ifdef __CYGWIN__
-+#define SYS_CYGWIN
- #endif
-
- #if defined( WIN32 )
--- css.c 2005-07-11 14:24:09.000000000 +0200
-+++ css.c 2005-10-01 19:02:35.000000000 +0200
-@@ -41,19 +41,11 @@
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
--#ifdef HAVE_SYS_PARAM_H
--# include <sys/param.h>
--#endif
--#ifdef HAVE_UNISTD_H
- # include <unistd.h>
--#endif
- #include <fcntl.h>
--
--#ifdef HAVE_LIMITS_H
++++ css.c 2005-10-01 20:14:37.000000000 +0200
+@@ -53,7 +56,7 @@
# include <limits.h>
--#endif
+ #endif
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
@@ -51,30 +11,6 @@
#include "css.h"
--- device.c 2005-07-11 13:33:34.000000000 +0200
+++ device.c 2005-10-01 19:08:07.000000000 +0200
-@@ -31,23 +31,12 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#ifdef HAVE_ERRNO_H
- # include <errno.h>
--#endif
- #include <sys/types.h>
- #include <sys/stat.h>
--#ifdef HAVE_SYS_PARAM_H
--# include <sys/param.h>
--#endif
- #include <fcntl.h>
--
--#ifdef HAVE_UNISTD_H
- # include <unistd.h>
--#endif
--
--#ifdef HAVE_LIMITS_H
- # include <limits.h>
--#endif
-
- #if defined( WIN32 ) && !defined( SYS_CYGWIN )
- # include <io.h> /* read() */
@@ -55,7 +44,7 @@
# include <sys/uio.h> /* struct iovec */
#endif
@@ -99,19 +35,10 @@
/* Initialize readv temporary buffer */
dvdcss->p_readv_buffer = NULL;
--- error.c 2004-02-24 16:46:49.000000000 +0100
-+++ error.c 2005-10-01 19:10:06.000000000 +0200
-@@ -25,16 +25,9 @@
-
- #include <stdio.h>
- #include <stdlib.h>
--
--#ifdef HAVE_SYS_PARAM_H
--# include <sys/param.h>
--#endif
--
--#ifdef HAVE_LIMITS_H
++++ error.c 2005-10-01 20:15:46.000000000 +0200
+@@ -34,7 +37,7 @@
# include <limits.h>
--#endif
+ #endif
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
@@ -132,31 +59,10 @@
*/
/*
-@@ -103,28 +100,12 @@
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
--#ifdef HAVE_SYS_PARAM_H
--# include <sys/param.h>
--#endif
--#ifdef HAVE_PWD_H
--# include <pwd.h>
--#endif
- #include <fcntl.h>
- #include <errno.h>
--
--#ifdef HAVE_UNISTD_H
- # include <unistd.h>
--#endif
--
--#ifdef HAVE_LIMITS_H
- # include <limits.h>
--#endif
+@@ -124,7 +127,7 @@
+ # include <direct.h>
+ #endif
--#ifdef HAVE_DIRECT_H
--# include <direct.h>
--#endif
--
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
More information about the MPlayer-cvslog
mailing list