Ticket #53: bsdrtc.diff

File bsdrtc.diff, 3.2 KB (added by reimar, 22 years ago)

RTC on BSD

  • configure

    RCS file: /cvsroot/mplayer/main/configure,v
    retrieving revision 1.946
    diff -u -r1.946 configure
     
    167167  --disable-tv-bsdbt848  disable BSD BT848 Interface support [autodetect]
    168168  --disable-edl          disable EDL (edit decision list) support [enable]
    169169  --disable-rtc          disable RTC (/dev/rtc) on Linux [autodetect]
     170  --disable-bsdrtc       disable BSD style RTC (/dev/rtc) [autodetect]
    170171  --disable-network      disable network support (for: http/mms/rtp) [enable]
    171172  --enable-winsock2      enable winsock2 usage [autodetect]
    172173  --enable-smb           enable Samba (SMB) input support [autodetect]
    … …  
    13001302_iconv=auto
    13011303_langinfo=auto
    13021304_rtc=auto
     1305_bsdrtc=auto
    13031306_ossaudio=auto
    13041307_arts=auto
    13051308_esd=auto
    … …  
    14721476  --disable-langinfo)   _langinfo=no    ;;
    14731477  --enable-rtc)         _rtc=yes        ;;
    14741478  --disable-rtc)        _rtc=no         ;;
     1479  --enable-bsdrtc)      _bsdrtc=yes     ;;
     1480  --disable-bsdrtc)     _bsdrtc=no      ;;
    14751481  --enable-mp1e)        _mp1e=yes       ;;
    14761482  --disable-mp1e)       _mp1e=no        ;;
    14771483  --enable-libdv)       _libdv=yes      ;;
    … …  
    50005012
    50015013
    50025014echocheck "RTC"
    5003 if linux ; then
    50045015  if test "$_rtc" = auto ; then
    50055016    cat > $TMPC << EOF
    50065017#include <sys/ioctl.h>
    … …  
    50105021    _rtc=no
    50115022    cc_check && _rtc=yes
    50125023  fi
    5013   echores "$_rtc"
    5014 else
    5015   _rtc=no
    5016   echores "no (Linux specific feature)"
    5017 fi
    50185024if test "$_rtc" = yes ; then
    50195025  _def_rtc='#define HAVE_RTC 1'
     5026  _bsdrtc=no
     5027  echores "yes"
    50205028else
    50215029  _def_rtc='#undef HAVE_RTC'
    50225030fi
    50235031
     5032if test "$_bsdrtc" = auto ; then
     5033    cat > $TMPC << EOF
     5034#include <sys/ioctl.h>
     5035#include <rtc.h>
     5036int main(void) { return RTCIO_IRQP_READ; }
     5037EOF
     5038    _bsdrtc=no
     5039    cc_check && _bsdrtc=yes
     5040fi
     5041if test "$_bsdrtc" = yes ; then
     5042  _def_bsdrtc='#define HAVE_BSDRTC 1'
     5043  echores "yes (BSD style)"
     5044else
     5045  _def_bsdrtc='#undef HAVE_BSDRTC'
     5046  echores "no"
     5047fi
    50245048
    50255049echocheck "external liblzo support"
    50265050if test "$_liblzo" = auto ; then
    … …  
    68446868/* define this to use RTC (/dev/rtc) for video timers (LINUX only) */
    68456869$_def_rtc
    68466870
     6871/* as above but with BSD style RTC headers (RTCIO_*) */
     6872$_def_bsdrtc
     6873
    68476874/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
    68486875#define MAX_OUTBURST 65536
    68496876
  • mplayer.c

    RCS file: /cvsroot/mplayer/main/mplayer.c,v
    retrieving revision 1.821
    diff -u -r1.821 mplayer.c
     
    9494
    9595#ifdef HAVE_RTC
    9696#include <linux/rtc.h>
     97#elif defined(HAVE_BSDRTC)
     98#include <rtc.h>
     99#define RTC_IRQP_SET RTCIO_IRQP_SET
     100#define RTC_PIE_ON RTCIO_PIE_ON
     101#define HAVE_RTC 1
    97102#endif
    98103
    99104#ifdef USE_TV
  • cfg-mplayer.h

    RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
    retrieving revision 1.235
    diff -u -r1.235 cfg-mplayer.h
     
    115115extern int xinerama_screen;
    116116#endif
    117117
    118 #ifdef HAVE_RTC
     118#if defined(HAVE_RTC) || defined(HAVE_BSDRTC)
    119119extern int nortc;
    120120#endif
    121121