forwarded 325489 [EMAIL PROTECTED]
thanks
Forwarded from debian bug #325489.
Would anyone mind to have this patch commited in xine CVS?
Petr Salinger <[EMAIL PROTECTED]> writes:
> enclosed please find updated patch for current xine-lib on GNU/kFreeBSD.
>
> Please, could you include it in the next upload?
--- xine-lib-1.1.2+dfsg.orig/configure.ac
+++ xine-lib-1.1.2+dfsg/configure.ac
@@ -1059,7 +1059,7 @@
enable_vidix="yes"
enable_linux="yes"
;;
- i386-*-freebsd*)
+ i386-*-freebsd*|i?86-*-kfreebsd*-gnu)
enable_vidix="yes"
enable_dha_kmod="no"
;;
@@ -1745,7 +1745,7 @@
AC_DEFINE([HAVE_WIN32_CDROM], [1],
[Define 1 if you have MinGW CD-ROM support])
;;
- freebsd4.*)
+ freebsd4.*|kfreebsd*-gnu)
AC_DEFINE([HAVE_FREEBSD_CDROM], [1],
[Define 1 if you have FreeBSD CD-ROM support])
;;
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/video_out/libdha/ports.c
+++ xine-lib-1.1.2+dfsg/src/video_out/libdha/ports.c
@@ -69,7 +69,7 @@
/* OS depended stuff */
#if defined (linux)
#include "sysdep/pci_linux.c"
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
#include "sysdep/pci_freebsd.c"
#elif defined (__386BSD__)
#include "sysdep/pci_386bsd.c"
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/input_cdda.c
+++ xine-lib-1.1.2+dfsg/src/input/input_cdda.c
@@ -613,7 +613,7 @@
return 0;
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/cdio.h>
@@ -689,12 +689,12 @@
unsigned char *data) {
int fd = this_gen->fd;
-#if __FreeBSD_version < 501106
+#if (__FreeBSD_version < 501106) && (__FreeBSD_kernel_version < 501106)
struct ioc_read_audio cdda;
#endif
while( num_frames ) {
-#if __FreeBSD_version < 501106
+#if (__FreeBSD_version < 501106) && (__FreeBSD_kernel_version < 501106)
cdda.address_format = CD_MSF_FORMAT;
cdda.address.msf.minute = frame / CD_SECONDS_PER_MINUTE /
CD_FRAMES_PER_SECOND;
cdda.address.msf.second = (frame / CD_FRAMES_PER_SECOND) %
CD_SECONDS_PER_MINUTE;
@@ -703,7 +703,7 @@
cdda.buffer = data;
#endif
-#if __FreeBSD_version >= 501106
+#if (__FreeBSD_version >= 501106) || (__FreeBSD_kernel_version >= 501106)
if (pread(fd, data, CD_RAW_FRAME_SIZE, frame * CD_RAW_FRAME_SIZE) !=
CD_RAW_FRAME_SIZE) {
#else
/* read a frame */
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/media_helper.c
+++ xine-lib-1.1.2+dfsg/src/input/media_helper.c
@@ -36,7 +36,7 @@
#include <unistd.h>
#include <string.h>
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) ||
defined(__FreeBSD_kernel__)
#include <sys/cdio.h> /* CDIOCALLOW etc... */
#elif defined(HAVE_LINUX_CDROM_H)
#include <linux/cdrom.h>
@@ -130,7 +130,7 @@
return 0;
}
-#elif defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
+#elif defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
|| defined (__FreeBSD_kernel__)
if (ioctl(fd, CDIOCALLOW) == -1) {
xprintf(xine, XINE_VERBOSITY_DEBUG, "ioctl(cdromallow): %s\n",
strerror(errno));
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/input_dvd.c
+++ xine-lib-1.1.2+dfsg/src/input/input_dvd.c
@@ -64,7 +64,7 @@
#endif /* WIN32 */
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) ||
defined (__FreeBSD_kernel__)
#include <sys/dvdio.h>
#include <sys/cdio.h> /* CDIOCALLOW etc... */
#elif defined(HAVE_LINUX_CDROM_H)
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/input_vcd.c
+++ xine-lib-1.1.2+dfsg/src/input/input_vcd.c
@@ -40,7 +40,7 @@
#ifdef HAVE_SYS_CDIO_H
# include <sys/cdio.h>
/* TODO: not clean yet */
-# if defined (__FreeBSD__)
+# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
# include <sys/cdrio.h>
# endif
#endif
@@ -95,7 +95,7 @@
#if defined (__linux__) || defined(__sun)
struct cdrom_tochdr tochdr;
struct cdrom_tocentry tocent[100];
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
struct ioc_toc_header tochdr;
struct cd_toc_entry *tocent;
off_t cur_sec;
@@ -120,7 +120,7 @@
int cur_track;
-#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__)
+#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__) || defined
(__FreeBSD_kernel__)
uint8_t cur_min, cur_sec, cur_frame;
#endif
@@ -180,7 +180,7 @@
return 0;
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
struct ioc_read_toc_entry te;
@@ -396,7 +396,7 @@
memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */
return VCDSECTORSIZE;
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
char *buf, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -534,7 +534,7 @@
memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */
return buf;
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
fifo_buffer_t *fifo, off_t nlen) {
@@ -693,7 +693,7 @@
return offset ; /* FIXME */
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
static off_t vcd_plugin_seek (input_plugin_t *this_gen,
off_t offset, int origin) {
@@ -767,7 +767,7 @@
return (off_t) 0;
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
off_t len ;
@@ -862,7 +862,7 @@
this->cur_min = this->cls->tocent[this->cur_track].cdte_addr.msf.minute;
this->cur_sec = this->cls->tocent[this->cur_track].cdte_addr.msf.second;
this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
{
int bsize = 2352;
if (ioctl (this->fd, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/vcd/libcdio/FreeBSD/freebsd.h
+++ xine-lib-1.1.2+dfsg/src/input/vcd/libcdio/FreeBSD/freebsd.h
@@ -78,7 +78,7 @@
#include <sys/ioctl.h>
#include <sys/param.h> /* for __FreeBSD_version */
-#if __FreeBSD_version < 500000
+#if (__FreeBSD_version < 500000) && (__FreeBSD_kernel_version < 500000)
#define DEVICE_POSTFIX "c"
#else
#define DEVICE_POSTFIX ""
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/libdvdnav/bswap.h
+++ xine-lib-1.1.2+dfsg/src/input/libdvdnav/bswap.h
@@ -35,7 +35,7 @@
#include <sys/param.h>
#endif
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GLIBC__)
#include <byteswap.h>
#define B2N_16(x) x = bswap_16(x)
#define B2N_32(x) x = bswap_32(x)
only in patch2:
unchanged:
--- xine-lib-1.1.2+dfsg.orig/src/input/libdvdnav/dvd_reader.c
+++ xine-lib-1.1.2+dfsg/src/input/libdvdnav/dvd_reader.c
@@ -49,7 +49,7 @@
#define lseek64 _lseeki64
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ||
defined(__bsdi__)|| defined(__DARWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ||
defined(__bsdi__)|| defined(__DARWIN__) || defined (__FreeBSD_kernel__)
#define SYS_BSD 1
#endif
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]