Test for presense of lstat (optionally used in scan_devices of
cdda_interface).
This commit is contained in:
@@ -19,7 +19,7 @@ define(RELEASE_NUM, 73)
|
|||||||
define(CDIO_VERSION_STR, 0.$1cvs)
|
define(CDIO_VERSION_STR, 0.$1cvs)
|
||||||
|
|
||||||
AC_PREREQ(2.52)
|
AC_PREREQ(2.52)
|
||||||
AC_REVISION([$Id: configure.ac,v 1.138 2005/02/03 07:30:15 rocky Exp $])dnl
|
AC_REVISION([$Id: configure.ac,v 1.139 2005/02/03 07:52:15 rocky Exp $])dnl
|
||||||
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
|
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
|
||||||
AC_CONFIG_SRCDIR(src/cd-info.c)
|
AC_CONFIG_SRCDIR(src/cd-info.c)
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH",
|
|||||||
[Full path to libcdio top_sourcedir.])
|
[Full path to libcdio top_sourcedir.])
|
||||||
AC_SUBST(LIBCDIO_SOURCE_PATH)
|
AC_SUBST(LIBCDIO_SOURCE_PATH)
|
||||||
|
|
||||||
AC_CHECK_FUNCS( [bzero ftruncate memcpy memset snprintf \
|
AC_CHECK_FUNCS( [bzero ftruncate lstat memcpy memset snprintf \
|
||||||
tzset vsnprintf] )
|
tzset vsnprintf] )
|
||||||
|
|
||||||
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: scan_devices.c,v 1.18 2005/01/27 03:10:06 rocky Exp $
|
$Id: scan_devices.c,v 1.19 2005/02/03 07:52:15 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
Copyright (C) 1998 Monty xiphmont@mit.edu
|
Copyright (C) 1998 Monty xiphmont@mit.edu
|
||||||
@@ -26,17 +26,13 @@
|
|||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
#include "common_interface.h"
|
#include "common_interface.h"
|
||||||
#include <limits.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include "low_interface.h"
|
#include "low_interface.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "cdio/scsi_mmc.h"
|
#include "cdio/scsi_mmc.h"
|
||||||
|
#include <limits.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
|
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
|
||||||
/* must be absolute paths! */
|
/* must be absolute paths! */
|
||||||
@@ -153,6 +149,7 @@ cdio_cddap_identify_cdio(CdIo_t *p_cdio, int messagedest, char **ppsz_messages)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LSTAT
|
||||||
static char *
|
static char *
|
||||||
test_resolve_symlink(const char *file, int messagedest, char **ppsz_messages)
|
test_resolve_symlink(const char *file, int messagedest, char **ppsz_messages)
|
||||||
{
|
{
|
||||||
@@ -170,6 +167,7 @@ test_resolve_symlink(const char *file, int messagedest, char **ppsz_messages)
|
|||||||
file);
|
file);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static cdrom_drive_t *
|
static cdrom_drive_t *
|
||||||
cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device,
|
cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device,
|
||||||
@@ -304,6 +302,7 @@ cdio_cddap_identify_cooked(const char *psz_dev, int messagedest,
|
|||||||
{
|
{
|
||||||
CdIo_t *p_cdio = NULL;
|
CdIo_t *p_cdio = NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_LSTAT
|
||||||
if (psz_dev) {
|
if (psz_dev) {
|
||||||
char *psz_device = test_resolve_symlink(psz_dev, messagedest,
|
char *psz_device = test_resolve_symlink(psz_dev, messagedest,
|
||||||
ppsz_messages);
|
ppsz_messages);
|
||||||
@@ -316,6 +315,7 @@ cdio_cddap_identify_cooked(const char *psz_dev, int messagedest,
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
p_cdio = cdio_open(psz_dev, DRIVER_UNKNOWN);
|
p_cdio = cdio_open(psz_dev, DRIVER_UNKNOWN);
|
||||||
return cdda_identify_device_cdio(p_cdio, psz_dev, messagedest,
|
return cdda_identify_device_cdio(p_cdio, psz_dev, messagedest,
|
||||||
ppsz_messages);
|
ppsz_messages);
|
||||||
|
|||||||
Reference in New Issue
Block a user