Add constant variable to indicate which OS driver we've got in build.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* -*- c -*-
|
/* -*- c -*-
|
||||||
$Id: cdio.h,v 1.62 2004/08/27 04:17:08 rocky Exp $
|
$Id: cdio.h,v 1.63 2004/08/27 11:23:40 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -105,6 +105,14 @@ extern "C" {
|
|||||||
DRIVER_DEVICE /**< Is really a set of the above; should come last */
|
DRIVER_DEVICE /**< Is really a set of the above; should come last */
|
||||||
} driver_id_t;
|
} driver_id_t;
|
||||||
|
|
||||||
|
/** There will generally be only one hardware for a given
|
||||||
|
build/platform from the list above. You can use the variable
|
||||||
|
below to determine which you've got. If the build doesn't make an
|
||||||
|
hardware driver, then the value will be DRIVER_UNKNOWN.
|
||||||
|
*/
|
||||||
|
extern const driver_id_t cdio_os_driver;
|
||||||
|
|
||||||
|
|
||||||
/** Make sure what's listed for CDIO_MIN_DRIVER is the last
|
/** Make sure what's listed for CDIO_MIN_DRIVER is the last
|
||||||
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
|
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
|
||||||
entry above we don't have to add one.
|
entry above we don't have to add one.
|
||||||
|
|||||||
21
lib/cdio.c
21
lib/cdio.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cdio.c,v 1.69 2004/08/27 04:17:08 rocky Exp $
|
$Id: cdio.c,v 1.70 2004/08/27 11:23:40 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
#include <cdio/logging.h>
|
#include <cdio/logging.h>
|
||||||
#include "cdio_private.h"
|
#include "cdio_private.h"
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: cdio.c,v 1.69 2004/08/27 04:17:08 rocky Exp $";
|
static const char _rcsid[] = "$Id: cdio.c,v 1.70 2004/08/27 11:23:40 rocky Exp $";
|
||||||
|
|
||||||
|
|
||||||
const char *track_format2str[6] =
|
const char *track_format2str[6] =
|
||||||
@@ -71,13 +71,28 @@ CdIo_driver_t CdIo_driver[CDIO_MAX_DRIVER] = { {0} };
|
|||||||
#define CDIO_DRIVER_UNINIT -1
|
#define CDIO_DRIVER_UNINIT -1
|
||||||
int CdIo_last_driver = CDIO_DRIVER_UNINIT;
|
int CdIo_last_driver = CDIO_DRIVER_UNINIT;
|
||||||
|
|
||||||
|
#ifdef HAVE_BSDI_CDROM
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_BSDI;
|
||||||
|
#elif HAVE_FREEBSD_CDROM
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_FREEBSD;
|
||||||
|
#elif HAVE_LINUX_CDROM
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_LINUX;
|
||||||
|
#elif HAVE_DARWIN_CDROM
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_OSX;
|
||||||
|
#elif HAVE_DARWIN_SOLARIS
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_SOLARIS;
|
||||||
|
#elif HAVE_DARWIN_WIN32
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_WIN32;
|
||||||
|
#else
|
||||||
|
const driver_id_t cdio_os_driver = DRIVER_UNKNOWN;
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
cdio_have_false(void)
|
cdio_have_false(void)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The below array gives all drivers that can possibly appear.
|
/* The below array gives all drivers that can possibly appear.
|
||||||
on a particular host. */
|
on a particular host. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user