[MPlayer-dev-eng] [PATCH] -- FreeBSD RTC Support
Diego Biurrun
diego at biurrun.de
Mon Jan 3 01:43:16 CET 2005
Reimar Döffinger writes:
> On Mon, Jan 03, 2005 at 12:51:38AM +0100, Diego Biurrun wrote:
> > Reimar Döffinger writes:
> > > > > > Hi, This patch enables RTC support for FreeBSD.
> > > > > > I've personally been using rtc with mplayer for almost a year and
> > > > > > it works really well and this has been an option in FreeBSD ports for
> > > > > > over 9 months now.
> > > > >
> > > > > --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
> > > > > + --disable-bsdrtc disable BSD style RTC (/dev/rtc) [autodetect]
> > > >
> > > > I don't like this solution. Adding another check/option to configure is
> > > > superfluous IMHO. We should just extend the normal RTC check. I'll give
> > > > this a shot myself.
> > >
> > > Better start with the attached patch... The problem is that those two
> > > are quite different, I see no way you could do this with just one check
> > > and one define...
> >
> > Here is how I propose to solve this. Looks way simpler to me ;-)
>
> Well, it will only work with freebsd and nothing else, but it is a
> possibility...
Yes, for the moment it just extends the test to FreeBSD, as no other
platform besides Linux seems to implement RTC anyway..
I think having two tests is unnecessary (and slows down configure,
which is not a speed demon anyway). It should not be hard to add
support for more platforms later on.
> > --- configure 30 Dec 2004 12:11:32 -0000 1.948
> > +++ configure 2 Jan 2005 23:46:53 -0000
> > @@ -5024,7 +5013,12 @@
> > if test "$_rtc" = auto ; then
> > cat > $TMPC << EOF
> > #include <sys/ioctl.h>
> > +#ifdef __FREEBSD__
>
> hm... __FREEBSD__ or __FreeBSD__ as below?
Ooops, the latter, the former is a bug.
> > +#include <rtc.h>
> > +#define RTC_IRQP_READ RTCIO_IRQP_SET
>
> That is ugly...
Why?
> > +#else
> > #include <linux/rtc.h>
> > +#endif
> > int main(void) { return RTC_IRQP_READ; }
>
> better change it here... it looks like nonesense to me to test for a
> function that we don't use... Or is there a specific reason for this?
Huh? The function is #defined to the one used on FreeBSD. The idea
is taken from what you implemented for mplayer.c, so ...
Diego
More information about the MPlayer-dev-eng
mailing list