Mercurial > mplayer.hg
changeset 2089:d7920c8257e2
BSD/OS support
author | arpi |
---|---|
date | Fri, 05 Oct 2001 00:39:54 +0000 |
parents | c42b1e60934a |
children | a19a4711bf1a |
files | Gui/mplayer/gtk/fs.h Gui/mplayer/psignal.h Makefile configure linux/getch2.c vcd_read.h |
diffstat | 6 files changed, 28 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.h Fri Oct 05 00:13:31 2001 +0000 +++ b/Gui/mplayer/gtk/fs.h Fri Oct 05 00:39:54 2001 +0000 @@ -9,7 +9,7 @@ #include <glob.h> #include <unistd.h> -#ifdef __SVR4 +#if defined(__SVR4) || defined(__bsdi__) #define get_current_dir_name() getcwd(NULL, PATH_MAX) #endif
--- a/Gui/mplayer/psignal.h Fri Oct 05 00:13:31 2001 +0000 +++ b/Gui/mplayer/psignal.h Fri Oct 05 00:39:54 2001 +0000 @@ -39,6 +39,10 @@ #define mplIncAudioBufferDelay 28 #define mplDecAudioBufferDelay 29 +#ifdef __bsdi__ +#define _NSIG NSIG +#endif + #ifdef __SVR4 #define SIGTYPE SIGUSR2 #warning should we use SIGUSR1 or SIGUSR2 on linux, bsd, ... too?
--- a/Makefile Fri Oct 05 00:13:31 2001 +0000 +++ b/Makefile Fri Oct 05 00:39:54 2001 +0000 @@ -113,15 +113,19 @@ $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML install: $(PRG) $(PRG_FIBMAP) - install -d $(BINDIR) + if [ ! -e $(BINDIR) ]; then \ + mkdir -p $(BINDIR); \ + fi install -m 755 -s $(PRG) $(BINDIR)/$(PRG) - install -d $(prefix)/man/man1 - install -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1 + if [ ! -e $(prefix)/man/man1 ]; then \ + mkdir -p $(prefix)/man/man1; \ + fi + install -c -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1 @echo "Following task requires root privs. If it fails don't panic" @echo "however it means you can't use fibmap_mplayer." @echo "Without this (or without running mplayer as root) you won't be" @echo "able to play encrypted DVDs." - install -o 0 -g 0 -m 4755 -s $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP) + -install -o 0 -g 0 -m 4755 -s $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP) clean: rm -f *.o *~ $(OBJS)
--- a/configure Fri Oct 05 00:13:31 2001 +0000 +++ b/configure Fri Oct 05 00:39:54 2001 +0000 @@ -298,7 +298,7 @@ # Determine OS dependent libs _confcygwin="TARGET_CYGWIN=no" _confwin32= -if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then +if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" -o "$system_name" = "BSD/OS" ]; then _archlibs="-rdynamic -pthread" elif [ `echo $system_name | sed 's/[cC][yY][gG][wW][iI][nN].*/CYGWIN/'` = "CYGWIN" ]; then _confcygwin="TARGET_CYGWIN=yes" @@ -308,6 +308,10 @@ _archlibs="-ldl -lpthread" fi +if [ "$system_name" = "BSD/OS" ]; then + _archlibs="$_archlibs -ldvd" +fi + # LGB: temporary files TMPC="mplayer-conf-${RANDOM}-$$-${RANDOM}.c" @@ -765,7 +769,7 @@ $_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes -if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then +if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" -o "$system_name" = "BSD/OS" ]; then $_cc $TMPC -o $TMPO -pthread > /dev/null 2>&1 || \ { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; } else @@ -855,7 +859,7 @@ if [ $_x11 = yes ]; then $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib > /dev/null 2>&1 && _xdpms_3=yes -nm `echo $_x11libdir|cut -b 3-`/libXext.a | grep DPMSQueryExtension > /dev/null 2>&1 && _xdpms_4=yes +nm `echo $_x11libdir|cut -c 3-`/libXext.a | grep DPMSQueryExtension > /dev/null 2>&1 && _xdpms_4=yes $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib > /dev/null 2>&1 && _xv=yes $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib > /dev/null 2>&1 && _vm=yes
--- a/linux/getch2.c Fri Oct 05 00:13:31 2001 +0000 +++ b/linux/getch2.c Fri Oct 05 00:39:54 2001 +0000 @@ -205,7 +205,7 @@ struct termios tio_new; #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) tcgetattr(0,&tio_orig); -#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) ioctl(0,TIOCGETA,&tio_orig); #else ioctl(0,TCGETS,&tio_orig); @@ -216,7 +216,7 @@ tio_new.c_cc[VTIME] = 0; #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) tcsetattr(0,TCSANOW,&tio_new); -#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) ioctl(0,TIOCSETA,&tio_new); #else ioctl(0,TCSETS,&tio_new); @@ -228,7 +228,7 @@ if(!getch2_status) return; // already disabled / never enabled #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) tcsetattr(0,TCSANOW,&tio_orig); -#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) ioctl(0,TIOCSETA,&tio_orig); #else ioctl(0,TCSETS,&tio_orig);
--- a/vcd_read.h Fri Oct 05 00:13:31 2001 +0000 +++ b/vcd_read.h Fri Oct 05 00:39:54 2001 +0000 @@ -1,11 +1,13 @@ //=================== VideoCD ========================== -#if defined(linux) || defined(sun) +#if defined(linux) || defined(sun) || defined(__bsdi__) #if defined(linux) #include <linux/cdrom.h> #elif defined(sun) #include <sys/cdio.h> static int sun_vcd_read(int, int*); +#elif defined(__bsdi__) +#include <dvd.h> #endif @@ -79,7 +81,7 @@ static char vcd_buf[VCD_SECTOR_SIZE]; static int vcd_read(int fd,char *mem){ -#if defined(linux) +#if defined(linux) || defined(__bsdi__) memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf)); if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF? memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA); @@ -236,7 +238,7 @@ ++vcd_cache_index;if(vcd_cache_index>=vcd_cache_size)vcd_cache_index=0; // read data! vcd_set_msf(vcd_cache_current); -#if defined(linux) +#if defined(linux) || defined(__bsdi__) memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf)); if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF? memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);