From 4c5c801d4e28d80fbebb76facd117a6c289d8fe2 Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 10 Mar 2004 10:57:44 +0000 Subject: [PATCH] ioctl: printf lint for cygwin (and perhaps others) cdio.c: define SEEK_SET for cygwin -mno-cygwin (and perhaps others) --- lib/MSWindows/ioctl.c | 10 ++++++---- lib/cdio.c | 10 +++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/MSWindows/ioctl.c b/lib/MSWindows/ioctl.c index 83b1966a..6d8909db 100644 --- a/lib/MSWindows/ioctl.c +++ b/lib/MSWindows/ioctl.c @@ -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 @@ -26,7 +26,7 @@ # include "config.h" #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 #include @@ -218,7 +218,8 @@ win32ioctl_read_audio_sectors (_img_private_t *env, void *data, lsn_t lsn, sizeof(RAW_READ_INFO), data, CDIO_CD_FRAMESIZE_RAW * nblocks, &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 0; @@ -274,7 +275,8 @@ win32ioctl_read_raw_sector (_img_private_t *env, void *buf, lsn_t lsn) NULL); if(! success) { - cdio_info("Error reading %lu (%ld)\n", lsn, GetLastError()); + cdio_info("Error reading %lu (%ld)\n", (long unsigned) lsn, + GetLastError()); return 1; } diff --git a/lib/cdio.c b/lib/cdio.c index 38368653..67d1b605 100644 --- a/lib/cdio.c +++ b/lib/cdio.c @@ -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 + Copyright (C) 2003, 2004 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software; you can redistribute it and/or modify @@ -37,7 +37,7 @@ #include #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] = @@ -669,6 +669,10 @@ cdio_read_audio_sectors (const CdIo *cdio, void *buf, lsn_t lsn, return -1; } +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + /*! Reads a single mode1 form1 or form2 sector from cd device into data starting from lsn. Returns 0 if no error.