this file contains three changes to the base NIST SPHERE 2.6a source distribution so it will compile on Red Hat 7.x and pass the tsphere test suite: (1) a compilation fix for exit.c (2) a bugfix for spread.c (won't pass tsphere) tsphere SEGVs; found double fclose() using valgrind (3) an addition to install.sh (no linux) =========================== cut here =========================== diff -c -r nist-2.6a/src/lib/sp/exit.c nist/src/lib/sp/exit.c *** nist-2.6a/src/lib/sp/exit.c Thu Jun 6 13:09:46 1996 --- nist/src/lib/sp/exit.c Wed Aug 7 00:27:44 2002 *************** *** 32,39 **** #else extern int errno; #endif ! extern char *sys_errlist[]; extern char *argv0; extern char *filenameo; extern FILE *fileo; --- 32,40 ---- #else extern int errno; #endif ! #ifndef linux extern char *sys_errlist[]; + #endif extern char *argv0; extern char *filenameo; extern FILE *fileo; diff -c -r nist-2.6a/src/lib/sp/spread.c nist/src/lib/sp/spread.c *** nist-2.6a/src/lib/sp/spread.c Thu Jun 6 13:09:43 1996 --- nist/src/lib/sp/spread.c Wed Mar 26 22:48:46 2003 *************** *** 1031,1038 **** /**** End SRI bugfix. ****/ if (! decomp_into_memory) { ! /* Close the original file pointer to the SPHERE file */ ! fclose(fob_in->fp); } fob_destroy(fob_in); --- 1031,1042 ---- /**** End SRI bugfix. ****/ if (! decomp_into_memory) { ! /* fob_in->fp was copied from spifr->waveform->sp_fp, which may */ ! /* now be closed in the code marked "SRI bugfix" above. */ ! if (spifr->waveform->sp_fp != FPNULL) { ! /* Close the original file pointer to the SPHERE file */ ! fclose(fob_in->fp); ! } } fob_destroy(fob_in); diff -c -r nist-2.6a/src/scripts/install.sh nist/src/scripts/install.sh *** nist-2.6a/src/scripts/install.sh Mon Aug 26 12:32:00 1996 --- nist/src/scripts/install.sh Wed Aug 7 01:19:35 2002 *************** *** 51,57 **** format="ID,OS,Compiler_Command,Compiler_Flags,Install_Command,Archive_Sorting_Command,Archive_Update_Command,Architecture" defs=`echo '1:Sun OS-4.1.[12]:gcc -ansi::install -c -s -m 755:ranlib:ar ru:SUN ! 2:Sun Solaris:gcc::cp:echo:ar ru:SUN 3:Next OS:cc::install -c -s -m 755:ranlib -s:ar ru:NEXT 4:Dec OSF/1 (with gcc):gcc -ansi::cp:ranlib:ar ru:OSF1 5:Dec OSF/1 (with cc):cc:-std1 -Olimit 700 -O -g3:cp -p:ranlib:ar ru:OSF1 --- 51,57 ---- format="ID,OS,Compiler_Command,Compiler_Flags,Install_Command,Archive_Sorting_Command,Archive_Update_Command,Architecture" defs=`echo '1:Sun OS-4.1.[12]:gcc -ansi::install -c -s -m 755:ranlib:ar ru:SUN ! 2:Sun Solaris:gcc:-O2:cp:echo:ar ru:SUN 3:Next OS:cc::install -c -s -m 755:ranlib -s:ar ru:NEXT 4:Dec OSF/1 (with gcc):gcc -ansi::cp:ranlib:ar ru:OSF1 5:Dec OSF/1 (with cc):cc:-std1 -Olimit 700 -O -g3:cp -p:ranlib:ar ru:OSF1 *************** *** 59,66 **** 7:HP Unix (with gcc):gcc -ansi::cp:ar -rs:ar -ru:HP 8:HP Unix (with cc):cc -Aa::cp:ar -rs:ar -ru:HP 9:IBM AIX:cc:-g:cp:ranlib:ar ru:AIX ! 10:Custom:cc:-g:install -s -m 755:ranlib:ar ru:SUN' | tr '\012' ','` ! Custom=10 #get_field(){ # # $1 the definition string --- 59,67 ---- 7:HP Unix (with gcc):gcc -ansi::cp:ar -rs:ar -ru:HP 8:HP Unix (with cc):cc -Aa::cp:ar -rs:ar -ru:HP 9:IBM AIX:cc:-g:cp:ranlib:ar ru:AIX ! 10:Linux RedHat:gcc:-O2:install -s -m 755:ranlib:ar ru:LINUX ! 11:Custom:cc:-g:install -s -m 755:ranlib:ar ru:SUN' | tr '\012' ','` ! Custom=11 #get_field(){ # # $1 the definition string