diff options
Diffstat (limited to 'audio/dap/patches/patch-ak')
-rw-r--r-- | audio/dap/patches/patch-ak | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/audio/dap/patches/patch-ak b/audio/dap/patches/patch-ak new file mode 100644 index 00000000000..6cebf98a7d9 --- /dev/null +++ b/audio/dap/patches/patch-ak @@ -0,0 +1,88 @@ +$NetBSD: patch-ak,v 1.1.1.1 1999/12/04 12:56:31 scw Exp $ + +--- libaudiofile/raw.c.orig Fri Nov 12 17:46:53 1999 ++++ libaudiofile/raw.c Tue Nov 30 15:54:00 1999 +@@ -29,7 +29,7 @@ + /*--------------------------------------------------------------------------- + | FUNCTION AFreadRAW + ---------------------------------------------------------------------------*/ +-AFfilehandle AFreadRAW (int file, rawType details) ++AFfilehandle AFreadRAW (fhandle file, rawType details) + { + struct stat s; + aiffHandle handleAct; +@@ -61,7 +61,11 @@ + handle->aiff.width = 16; + + // Can calculate frames from size of file ++#ifndef USE_STDIO + if (fstat (file,&s) == -1) return AF_NULL_FILEHANDLE; ++#else ++ if (fstat (fileno(file),&s) == -1) return AF_NULL_FILEHANDLE; ++#endif + + handle->aiff.framecount = s.st_size / details.channels; + switch (details.dataFormat) +@@ -83,7 +87,7 @@ + /*--------------------------------------------------------------------------- + | FUNCTION AFwriteRAW + ---------------------------------------------------------------------------*/ +-AFfilehandle AFwriteRAW (int file,AFfilesetup setup) ++AFfilehandle AFwriteRAW (fhandle file,AFfilesetup setup) + { + aiffHandle handleAct; + AFfilehandle handle = &handleAct; +@@ -114,7 +118,11 @@ + // If error then return negative number + + if (!handle) return -1; ++#ifndef USE_STDIO + if (close (handle->file) == -1) return -1; ++#else ++ if (fclose (handle->file) == -1) return -1; ++#endif + free (handle); + return 0; + } +@@ -127,7 +135,7 @@ + int i; + int j; + int frameCount; +- int file; ++ fhandle file; + unsigned char uctemp; + signed char ctemp; + unsigned short ustemp; +@@ -147,7 +155,11 @@ + i = 0; + frameCount = 0; + while (handle->actualFrames < handle->aiff.framecount && ++#ifndef USE_STDIO + frameCount < count) // && !(feof (file))) ++#else ++ frameCount < count && !(feof (file))) ++#endif + { + for (j=0; j<handle->aiff.channels; j++) + { +@@ -252,7 +264,7 @@ + int i; + int j; + int frameCount; +- int file; ++ fhandle file; + unsigned char uctemp; + signed char ctemp; + unsigned short ustemp; +@@ -271,7 +283,11 @@ + + i = 0; + frameCount = 0; ++#ifndef USE_STDIO + while (frameCount < count) // && !(feof (file))) ++#else ++ while (frameCount < count && !(feof (file))) ++#endif + { + for (j=0; j<handle->aiff.channels; j++) + { |