ioctl: printf lint for cygwin (and perhaps others)

cdio.c: define SEEK_SET for cygwin -mno-cygwin (and perhaps others)
This commit is contained in:
rocky
2004-03-10 10:57:44 +00:00
parent 21e6af7f72
commit 4c5c801d4e
2 changed files with 13 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: ioctl.c,v 1.3 2004/03/06 18:05:37 rocky Exp $ $Id: ioctl.c,v 1.4 2004/03/10 10:57:44 rocky Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com> Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h" # include "config.h"
#endif #endif
static const char _rcsid[] = "$Id: ioctl.c,v 1.3 2004/03/06 18:05:37 rocky Exp $"; static const char _rcsid[] = "$Id: ioctl.c,v 1.4 2004/03/10 10:57:44 rocky Exp $";
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/sector.h> #include <cdio/sector.h>
@@ -218,7 +218,8 @@ win32ioctl_read_audio_sectors (_img_private_t *env, void *data, lsn_t lsn,
sizeof(RAW_READ_INFO), data, sizeof(RAW_READ_INFO), data,
CDIO_CD_FRAMESIZE_RAW * nblocks, CDIO_CD_FRAMESIZE_RAW * nblocks,
&dwBytesReturned, NULL ) == 0 ) { &dwBytesReturned, NULL ) == 0 ) {
cdio_info("Error reading audio-mode %lu (%ld)\n", lsn, GetLastError()); cdio_info("Error reading audio-mode %lu (%ld)\n",
(long unsigned int) lsn, GetLastError());
return 1; return 1;
} }
return 0; return 0;
@@ -274,7 +275,8 @@ win32ioctl_read_raw_sector (_img_private_t *env, void *buf, lsn_t lsn)
NULL); NULL);
if(! success) { if(! success) {
cdio_info("Error reading %lu (%ld)\n", lsn, GetLastError()); cdio_info("Error reading %lu (%ld)\n", (long unsigned) lsn,
GetLastError());
return 1; return 1;
} }

View File

@@ -1,7 +1,7 @@
/* /*
$Id: cdio.c,v 1.40 2004/03/06 18:30:44 rocky Exp $ $Id: cdio.c,v 1.41 2004/03/10 10:57:44 rocky Exp $
Copyright (C) 2003 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>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -37,7 +37,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.40 2004/03/06 18:30:44 rocky Exp $"; static const char _rcsid[] = "$Id: cdio.c,v 1.41 2004/03/10 10:57:44 rocky Exp $";
const char *track_format2str[6] = const char *track_format2str[6] =
@@ -669,6 +669,10 @@ cdio_read_audio_sectors (const CdIo *cdio, void *buf, lsn_t lsn,
return -1; return -1;
} }
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
/*! /*!
Reads a single mode1 form1 or form2 sector from cd device Reads a single mode1 form1 or form2 sector from cd device
into data starting from lsn. Returns 0 if no error. into data starting from lsn. Returns 0 if no error.