[MPlayer-dev-eng] [PATH] libmpdvdkit and tvi_bsdbt848 on NetBSD
Steven M. Schultz
sms at 2BSD.COM
Sun Apr 28 21:15:39 CEST 2002
Hi!
> From: Bernd Ernesti <mplayer at lists.veego.de>
> > Ah, ok. I have FreeBSD, Linux and BSD/OS systems but not a NetBSD
> > one (yet;)). I know FreeBSD has <dvdio.h> instead of <dvd.h>
>
> NetBSD has also <dvdio.h>.
Ah, ok.
> > Testing for capabilities and .h files would be much better than
> > hardwiring by OS type.
> >
> > Check for <dvdio.h>, if it exists then check that something like
> > "struct dvd_struct foo;" will compile. If it succeeds then "BSD"
> > style is present.
>
> Are you sure that you don't mix it up again?
I do not think so - I have had a 2nd cup of coffee ;)
> Thats a way to test for HAVE_LINUX_DVD_STRUCT, at least on NetBSD and I guess
> it is the same on FreeBSD, BSD/OS and maye on OpenBSD.
How is checking for '<dvdio.h>' and '<dvd.h>' a way to test for
HAVE_LINUX_DVD_STRUCT?
I think we are in agreement that it is better to test for .h files
rather than trying to guess an OS type.
Instead of "BSD" style and "Linux" style check for <dvdio.h>, if it
is present then use it without classifying the system as "BSD" or
"Linux". I doubt that a system will have both dvdio.h and dvd.h
but if it does then include both of them.
Instead of HAVE_BSD_DVD_STRUCT and HAVE_LINUX_DVD_STRUCT and
DVD_STRUCT_IN_DVD_H and DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H and so on
perhaps simply HAVE_DVDIO_H and HAVE_DVD_H would be a better way?
It does seem to be more general and less prone to guessing incorrectly.
Cheers,
Steven Schultz
sms at 2bsd.com
More information about the MPlayer-dev-eng
mailing list