Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!fernwood!franz!layer From: layer@Franz.COM (Kevin Layer) Newsgroups: comp.sys.next Subject: patch for Allegro CL 3.1 on NeXT 2.0/2.1 Message-ID: Date: 28 Mar 91 19:04:11 GMT Sender: news@Franz.COM Distribution: comp Organization: Franz Inc., Berkeley, CA Lines: 308 A problem with DUMPLISP has been found and fixed, with the patch below, which is contained in a `shar' file. Basically, after you get your ACL loaded, but before you run `config' to install it, extract (in the `build' directory) and apply the patch as described in the README file. It will permanantly patch an object file in the ACL distribution and you may run `config' any number of times after doing so. =============================================================================== #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # README # install_patch.sh # fixit.c # patch.uu # This archive created: Wed Mar 27 19:13:35 1991 export PATH; PATH=/bin:$PATH if test -f 'README' then echo shar: will not over-write existing file "'README'" else cat << \SHAR_EOF > 'README' This patch fixes problems with DUMPLISP in NeXT ACL 3.1.20. Unpack the shar file in the `build' directory and run the shell script named `install_patch.sh'. This will patch ucl.o. Reinstall Allegro CL using config. If you have questions, contact customer support at Franz Inc. at bugs@franz.com or (415) 548-3600. SHAR_EOF fi # end of overwriting check if test -f 'install_patch.sh' then echo shar: will not over-write existing file "'install_patch.sh'" else cat << \SHAR_EOF > 'install_patch.sh' #! /bin/sh if test ! -f ucl_orig.o; then echo save ucl.o to ucl_orig.o... mv ucl.o ucl_orig.o fi if test ! -f patch.o; then echo unpack patch.o... uudecode patch.uu fi if test ! -f fixit; then echo make fixit... cc -o fixit fixit.c fi echo make ucl_temp.o... ld -r -o ucl_temp.o patch.o ucl_orig.o ############################################################################### set - `nm ucl_temp.o | grep dodump` dodump=0x$1 set - `nm ucl_temp.o | grep new_mach_dumplisp` new=0x$1 set - `otool -h ucl_temp.o | tail -1` # 28 is the size of the Mach header # $6 is the offset to the text segment in the Mach-O file offset=`expr 28 + $6` foo="./fixit ucl_temp.o $offset $dodump 38 $new" echo $foo $foo ############################################################################### set - `nm ucl_temp.o | grep mach_check_shlib_versions` mcsv=0x$1 set - `nm ucl_temp.o | grep new_find_vmlib` new=0x$1 set - `otool -h ucl_temp.o | tail -1` # 28 is the size of the Mach header # $6 is the offset to the text segment in the Mach-O file offset=`expr 28 + $6` foo="./fixit ucl_temp.o $offset $mcsv 146 $new" echo $foo $foo ############################################################################### mv ucl_temp.o ucl.o SHAR_EOF chmod +x 'install_patch.sh' fi # end of overwriting check if test -f 'fixit.c' then echo shar: will not over-write existing file "'fixit.c'" else cat << \SHAR_EOF > 'fixit.c' /* -[Wed Mar 27 18:02:49 1991 by layer]- */ #include #include main(argc, argv) char **argv; { char *file; int fd; long base; long offset; long foff; long new; long newval; long fixaddr; if (argc != 6) { fprintf(stderr, "usage: %s file foff base offset new\n", argv[0]); exit(1); } file = argv[1]; if ((fd = open(file, O_RDWR)) < 0) { fprintf(stderr, "can't open %s\n", file); exit(1); } foff = strtol(argv[2], NULL, 0); base = strtol(argv[3], NULL, 0); offset = strtol(argv[4], NULL, 0); new = strtol(argv[5], NULL, 0); fixaddr = base + offset; if (lseek(fd, fixaddr + foff, 0) != (fixaddr + foff)) { fprintf(stderr, "couldn't seek to %d in %s\n", fixaddr + foff, file); exit(1); } if (fixaddr > new) newval = new - fixaddr; else newval = fixaddr - new; if (write(fd, &newval, 4) != 4) { perror("write failed"); exit(1); } close(fd); exit(0); } SHAR_EOF fi # end of overwriting check if test -f 'patch.uu' then echo shar: will not over-write existing file "'patch.uu'" else cat << \SHAR_EOF > 'patch.uu' begin 644 patch.o M_NWZS@````8````!`````0````(```%@``````````$```%(```````````` M``````````````````LX```!?```"R0````'````!P````0`````7U]T97AT M`````````````%]?5$585``````````````````````),````7P````!```, MM````)H```````````````!?7V-S=')I;F<`````````7U]415A4```````` M````````"3````'T```*K````````!&$``````````(``````````%]?9&%T M80````````````!?7T1!5$$````````````````+)`````````R@`````@`` M$80`````````````````````7U]B_``,;`Q(>``"8?_____06$]"IR\N``PO!6'_____P-[\ M``Q*@&P,2'@``F'_____KEA/2H)O5"@.!H3___P`#((```0`;P@@/```!`!@ M`B`"+P`O!"\%8?____^")@#>_``,;R8O`R\$+P=A_____V[>_``,2H!L#$AX M``1A_____UQ83Y2#2H)NM$J#;`Q(>``$8?____]&6$]"IR\&+P5A_____SC> M_``,2H!L"DAX``)A_____R9"@$SN`/S[Z$Y>3G5.5O_D2.<\`"HN``@H+@`, M)BX`$$AN__QA_____OPM0/_\<`%83R0\````%&```0!*N0````!G/DJN_^QF M""`\```),&`&(#P```DU+P`O+O_H+R[_\"\N__0O+O_X2'D```DV8?____ZP M+P)A_____JC>_``<(B[_^+*N__QF$DJY`````&<``*1(>0``"6Y@("\N__AA M_____GY83TJ`9R)*N0````!G``""2'D```F38?____YB+P)A_____EI03V!H M2J[_[&<,2'@`!V'____^1EA/+R[_^&'____^.B\`2'D```FY8?____XLWOP` M#$J`9A(C[O_X`````"/N__``````8"0O+O_D+R[_Z"\N__`O+O_T+R[_^"\# M+P0O!6'____]\M[\`"!"@$AN_^1(;O_H2&[_[$AN__!(;O_T2&[_^"\`8?__ M__W,WOP`'$J`9@#^VDSN`#S_U$Y>3G5.5M[X2.<\,$*N_T!"KO\\0J[_.$*Y M`````'(!(\$`````2KD`````9S(@.0```!0&@```(``M0/\P!H```"``(\`` M````(@`&@?__X``CP0````!"N0````!@$"(Y``````:!___@`"U!_S!(>0`` M``!A_____4`M0/\T6$]G``":2J[_.&<,+R[_.&'____])EA/2J[_0&<,+R[_ M0&'____]%%A/2J[_/&<6(B[_/+*N_T!G#"\N_SQA_____/A83TJY`````&<. M2'D````48?____SB6$]R";*N_S1G!DJN_S1F!D*`8``%/DJY`````&``"8?____Q26$]"KO^(0J[_C"UN_T#_/$AX`?\O+@`( M8?____PT+4#_.%!/;`Q(>``#8?____PB6$](>``!2'@`'"\N_SAA_____`[> M_``,2H!L#$AX``1A____^_Q83R\N_T!A____^_`O.0````!A____^^0CP``` M``!(;O]X2&[_,"\N_SAA_____+;>_``42KD`````9PY(>0``">%A____^[18 M3W`!1>[^^&```>YR`[*09B1(>0``"@1(>0```"AA____^Y!(>``"8?____N& MWOP`#&```<)R`K*09@`!NB9(2KD`````9B!(>0``"BY(>0```"AA____^UI( M>``"8?____M0WOP`#"/N_S``````("L`#..`T*L`#.6`T*L`%"/``````'(! M+4'^^'(X+4'^_$AY```)N4AJ``AA____^Q(M>0````#_$"UY`````/\4+7D` M````_Q@M>0````#_''('+4'_('(%+4'_)$*N_RAR!"U!_RQ(>``X+PHO+O\X M8?____K,WOP`%'(XLH!G#$AX``1A____^KA83U*N_X@B+O[\TZ[_C$JY```` M`&0`` M"G%.DM[\`!!"IR\N_S`O+O\X8?____I@+R[_."`K``SC@-"K``SE@"\`+RL` M""\N_SQ%^0````!.DB\N_S@O*P`4+RL`$"\N_SQ.DM[\`"PO+O\X8?____H> M)V[_,``(("L`#..`T*L`#.6`T*[_,"=``!!(>``8+PLO+O\X8?____GTWOP` M$'(8LH!G#$AX``1A____^>!83R`K``SC@-"K``SE@-"K`!31KO\P4J[_B'(8 MTZ[_C&`>0H!(;O]$+P`O+O\\8?____FL($#>_``,2HAF`/WZ=*C4CB\"8?__ M__F44J[_B"(N_ZS3KO^,2'@`6"\"+R[_.&'____Y>-[\`!!R6+*`9PQ(>``$ M8?____ED6$]P`7H4)@X&@___WOA@``$J)"[_F)2%2KD`````9RXO+O^42'D` M``J<1?D`````3I(O+O^82'D```JT3I(O+O^<2'D```K&3I+>_``8*"[_G'(4 M+4'_G"\%2&[_E"\N_SAA____^/S>_``,NH!G#$AX``1A____^.I83TAX``$B M`D2!+P$O+O]`8?____C4+P(O`R\N_T!A____^,;>_``8M(!G#$AX``)A____ M^+183TJY`````&<0+P-(>0``"MMA____^)Q03R\#+P1A____^)!03TJ`9RA* MN0````!G%"\#+P1(>0``"NQA____^'+>_``,2'@``F'____X9%A/+P(O`R\N M_SAA____^%3>_``,M(!G#$AX``1A____^$)83U*N_X@B+O^8TZ[_C"(N_YC3 MKO\P0H`O`$AN_Y0O+O]`8?____@:WOP`#$J`9@#^P"(N_XRRN0````!C#$AX M``AA____]_I83T*G0JNWOP`#$J` M;`Q(>``$8?____><6$](>``)8?____>03.X,/-[@3EY.=4Y6```O"DJN``AG M)B/Y````$```"RAR'`:!`````"/!```+)$JY`````&P&0KD`````1?D```LL M8%P@>0``"R1R!K*09P9R![*09CI(>``,2'D```LL(CD```LD4($O`6'____W M($JY`````&<0"QS:7IE(#!X)7@L=FUS:7IE(#!X)7@L<')O="`P>"5X("@E6UB M;VP@=&%B;&4@8V]M;6%N9',*`$Q#7U-935-%1R!I6UO9F8@86YD('-TL```$T```!YP```+0```'C@``"=````=P```-T```!V0```G0```' M3````M````(` M`";0```%H```)=````5(```"T```!30```30```$[@``)-````2P```"T``` M!*8``"'0```$>@```M````1P```AT```!$P```G0```$-````<````0<```& MT```!!```!_0```$!````M````/R```!T````]X```+0```#S```'M````.N M```"T````YP```/0```#@@``'=````-V```"T````V@``!S0```#7@``&]`` M``-8```*T````TP```G0```#'@``"M````,(```:T````NP``!K0```"V@`` M&M````+````9T````C0``!'0```"#@``$-````'4```-T````<8```S0```! MN@```M````&F```*T````9X```G0```!@@``"]````%8```*T````5````G0 M```!!```!M````#:```"T````,@```'0````N@```M````"D```"T````)(` M``30````?@```]````!2```"T````$````'0````,````M`````>```!T``` M"1X```1````)%@``!$````D0```$0```"08```1````(_@``!$````CV```$ M0```"/```!-0```(Y@``$U````C6```$0```"-````1````(N@``!$````BR M```$0```"*P``!-0```(I```$U````B>```$0```")@``!50```(D```!$`` M``B,```54```""P```)````()```"%````?Z```74```!X@```)````'?``` M"%````=>```"0```!U0```A0```&Y````D````;8```"0```!LP```E0```& MQ@```D````:Z```(4```!<````%````%B@```D````5T```)4```!6X```)` M```%7```"%````4,```C4```!00``")0```$_```#U````3T```.4```!.0` M``)````$T@``(U````2\```B4```!*````=0```$F@```D````22```.4``` M!&H```=0```$9````D````1&```"0```!#X```A0```$(@``(%````06```@ M4````U(```=0```#1@```D````,Z```(4````Q@```=0```#$```"%````*Z M```84````JH``!90```"H@``%%````*<```74````HX``!90```">```%5`` M``)P```44````FH``!-0```"8@``#E````'L```/4````>0```Y0```!S@`` M`D````&8```"0````8X```A0```!=@```D````%L```(4````4H```)````! M,@```D````$J```"0````1P```A0```!$@``!U`````$#@$````````````7 M`0`````````````>`0`````````````O`0`````````````U`0`````````` M```\#@$``````.H```!1`0````````````!J`0````````````!P`0`````` M``````"``0````````````"(`0````````````"0`0````````````"G`0`` M``````````"\`0````````````#$`0````````0```#<`0````````0```#S M`0````````````$``0````````````$,#P$``````DP```$?`0````````0` M``$[`0````````````%0`0````````````%D`0````````````%U`0`````` M``````&'`0````````````&8`0````````````&A`0````````````&H`0`` M``````````&O`0````````````&[`0````````````'!`0````````````'( M`0````````````'>`0````````````'Q`0````````````'Z`0````````0` M``(4`0````````0```(O`0````````````(W`0````````````)#`0`````` M``````)4`0````````````)S`0````````````*%`0````````````*4#@0` M````"R0```*;#@0`````"R@```*J#@0`````"RP```*Q#P$`````"'X```+! M`0``````````````7V9I;&5?8V]P>5]S96=M96YT`%]L5]P`%]G971S M96=N86UE8GEA9&1R97-S`%]S=')C;7``7VQI;FME9&ET7W-E9VUE;G1?'1?F4`7V1U;7!L M:7-P7VIM<&)U9@!?7W-E=&IM<`!?8VQOF4`7W-T0!?;'-E96M?6US96=?8V]M M;6%N9`!?;6%C:%]M86ME7W1H