diff -ubr mpg123-0.59o.orig/Makefile mpg123-0.59o/Makefile --- mpg123-0.59o.orig/Makefile Sun Feb 8 12:23:04 1998 +++ mpg123-0.59o/Makefile Mon Oct 19 03:00:09 1998 @@ -81,7 +81,7 @@ linux-alpha: $(MAKE) CC=gcc LDFLAGS= OBJECTS='decode.o dct64.o audio_oss.o' \ - CFLAGS='-DLINUX -DOSS -Wall -O2 \ + CFLAGS='-DLINUX -DOSS -DREAL_IS_FLOAT -DREAD_MMAP -Wall -O2 \ -fomit-frame-pointer -funroll-all-loops \ -finline-functions -ffast-math \ -Wall -O6 -DUSE_MMAP' \ diff -ubr mpg123-0.59o.orig/common.c mpg123-0.59o/common.c --- mpg123-0.59o.orig/common.c Wed Feb 11 15:36:25 1998 +++ mpg123-0.59o/common.c Mon Oct 19 03:01:46 1998 @@ -4,6 +4,7 @@ #include #include +#include #include #ifdef READ_MMAP @@ -911,6 +912,8 @@ void open_stream(char *bs_filenam,int fd) { int i; + int flen; + struct stat s; filept_opened = 1; if (!bs_filenam) { @@ -927,9 +930,15 @@ perror (bs_filenam); exit(1); } + if(fstat(filept, &s) == -1) { + fprintf(stderr, "Error: fstat failed\n"); + flen = -1; + } else { + flen = s.st_size; + } for(i=0;;i++) { - readers[i].filelen = -1; + readers[i].filelen = flen; if(!readers[i].init) { rd = &readers[i]; break; @@ -1142,7 +1151,7 @@ fprintf(stderr,"Time: %3.2f [%3.2f], ",tim1,tim2); if(param.usebuffer) - fprintf(stderr,"[%8d] ",buffsize); + fprintf(stderr,"[%8ld] ",buffsize); } int get_songlen(struct frame *fr,int no) diff -ubr mpg123-0.59o.orig/mpg123.c mpg123-0.59o/mpg123.c --- mpg123-0.59o.orig/mpg123.c Wed Feb 11 15:15:08 1998 +++ mpg123-0.59o/mpg123.c Mon Oct 19 03:01:08 1998 @@ -639,7 +639,7 @@ } } -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int result; unsigned long frameNum = 0; @@ -655,7 +655,7 @@ #endif if(sizeof(short) != 2) { - fprintf(stderr,"Ouch SHORT has size of %d bytes (required: '2')\n",sizeof(short)); + fprintf(stderr,"Ouch SHORT has size of %d bytes (required: '2')\n",(int)sizeof(short)); exit(1); }