Adapted from patches by Nicolas Boullis on Debian:

* alignment issues on sparc
 * "make check" failure when stderr is not a tty
 * wrong program name in manpages in tarball
 * build failure with hurd
 * "make check" failure on machines with no disc drive
 * make distclean fixes
This commit is contained in:
R. Bernstein
2009-07-02 20:26:39 -04:00
parent e7ac0ea72c
commit 2522c26ec8
15 changed files with 84 additions and 1407 deletions

View File

@@ -7,3 +7,5 @@
/Makefile.in
/libcdio.la
/libcdio.la.ver
/*.orig
/*.rej

View File

@@ -1,7 +1,8 @@
/*
$Id: _cdio_generic.c,v 1.27 2008/04/22 15:29:11 karl Exp $
Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,6 +50,10 @@ static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.27 2008/04/22 15:29:11 ka
#include "_cdio_stdio.h"
#include "portable.h"
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
/*!
Eject media -- there's nothing to do here. We always return -2.
Should we also free resources?

View File

@@ -2,7 +2,7 @@
$Id: gnu_linux.c,v 1.33 2008/06/25 07:46:21 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009
Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
@@ -77,6 +77,10 @@ static const char _rcsid[] = "$Id: gnu_linux.c,v 1.33 2008/06/25 07:46:21 rocky
#include <sys/types.h>
#include <sys/ioctl.h>
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
typedef enum {
_AM_NONE,
_AM_IOCTL,
@@ -1429,7 +1433,7 @@ cdio_get_default_device_linux(void)
/* Scan the system for CD-ROM drives.
*/
for ( i=0; strlen(checklist1[i]) > 0; ++i ) {
for ( i=0; i < checklist1_size; ++i ) {
if (snprintf(drive, sizeof(drive), "/dev/%s", checklist1[i]) < 0)
continue;
if ( is_cdrom_linux(drive, NULL) > 0 ) {

View File

@@ -1,7 +1,8 @@
/*
$Id: nrg.c,v 1.31 2008/04/21 18:30:22 karl Exp $
Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@@ -715,23 +716,28 @@ parse_nrg (_img_private_t *p_env, const char *psz_nrg_name,
case SINF_ID: { /* "SINF" */
uint32_t *_sessions = (void *) chunk->data;
uint32_t _sessions;
cdio_assert (UINT32_FROM_BE (chunk->len) == 4);
memcpy(&_sessions, chunk->data, 4);
cdio_debug ("SINF: %lu sessions",
(long unsigned int) UINT32_FROM_BE (*_sessions));
(long unsigned int) UINT32_FROM_BE (_sessions));
}
break;
case MTYP_ID: { /* "MTYP" */
uint32_t *mtyp_p = (void *) chunk->data;
uint32_t mtyp = UINT32_FROM_BE (*mtyp_p);
uint32_t mtyp_be;
uint32_t mtyp;
cdio_assert (UINT32_FROM_BE (chunk->len) == 4);
memcpy(&mtyp_be, chunk->data, 4);
mtyp = UINT32_FROM_BE (mtyp_be);
cdio_debug ("MTYP: %lu",
(long unsigned int) UINT32_FROM_BE (*mtyp_p));
(long unsigned int) mtyp);
if (mtyp != MTYP_AUDIO_CD) {
cdio_log (log_level,

View File

@@ -1,7 +1,8 @@
/*
$Id: util.c,v 1.6 2008/04/22 15:29:12 karl Exp $
Copyright (C) 2003, 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2005, 2008, 2009
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify
@@ -40,6 +41,10 @@
#include <cdio/types.h>
#include <cdio/util.h>
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
static const char _rcsid[] = "$Id: util.c,v 1.6 2008/04/22 15:29:12 karl Exp $";
size_t