Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!elroy!devvax!lroot From: lroot@devvax.JPL.NASA.GOV (The Superuser) Newsgroups: comp.sources.bugs Subject: perl 2.0 patch #10 Summary: This is an official patch for perl 2.0. Please apply it. Message-ID: <2465@devvax.JPL.NASA.GOV> Date: 16 Jul 88 01:22:07 GMT Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 163 System: perl version 2.0 Patch #: 10 Priority: Subject: finally nailed The Bug (the one that makes TEST blow up on UnixPC, etc) Subject: UTS can't cast char to double Description: Now I *know* I'm a danglesocket--The Bug turned out to be staring me in the face. The line around which Hokey put his workaround doesn't want to execute at all during the first pass of regular expression compilation. Can one die from kicking oneself? It so happens that UTS can't cast a char to a double, so a lot of the boolean operations fail. The solution seems to be to make bool an integer type (only on UTS machines). Fix: From rn, say "| patch -p -N -d DIR", where DIR is your perl source directory. Outside of rn, say "cd DIR; patch -p -N#define PATCHLEVEL 10 Index: handy.h Prereq: 2.0 *** handy.h.old Fri Jul 15 18:10:58 1988 --- handy.h Fri Jul 15 18:10:59 1988 *************** *** 1,6 **** ! /* $Header: handy.h,v 2.0 88/06/05 00:09:03 root Exp $ * * $Log: handy.h,v $ * Revision 2.0 88/06/05 00:09:03 root * Baseline version 2.0. * --- 1,9 ---- ! /* $Header: handy.h,v 2.0.1.1 88/07/15 18:08:42 root Exp $ * * $Log: handy.h,v $ + * Revision 2.0.1.1 88/07/15 18:08:42 root + * patch10: UTS can't cast char to double + * * Revision 2.0 88/06/05 00:09:03 root * Baseline version 2.0. * *************** *** 14,20 **** --- 17,27 ---- #define Nullch Null(char*) #define Nullfp Null(FILE*) + #ifdef UTS + #define bool int + #else #define bool char + #endif #define TRUE (1) #define FALSE (0) Index: regexp.c Prereq: 2.0.1.2 *** regexp.c.old Fri Jul 15 18:11:06 1988 --- regexp.c Fri Jul 15 18:11:08 1988 *************** *** 7,15 **** * blame Henry for some of the lack of readability. */ ! /* $Header: regexp.c,v 2.0.1.2 88/07/11 23:05:53 root Exp $ * * $Log: regexp.c,v $ * Revision 2.0.1.2 88/07/11 23:05:53 root * patch2: added Hokey's workaround for 68000 addlepation * patch2: changed some savestr's to avoid recalculating length when we know it --- 7,19 ---- * blame Henry for some of the lack of readability. */ ! /* $Header: regexp.c,v 2.0.1.3 88/07/15 18:10:47 root Exp $ * * $Log: regexp.c,v $ + * Revision 2.0.1.3 88/07/15 18:10:47 root + * patch9: finally nailed The Bug + * patch9: UTS can't cast char to double + * * Revision 2.0.1.2 88/07/11 23:05:53 root * patch2: added Hokey's workaround for 68000 addlepation * patch2: changed some savestr's to avoid recalculating length when we know it *************** *** 806,823 **** *flagp |= HASWIDTH; if (len == 1) *flagp |= SIMPLE; ! #ifdef m68k ! #define Vomit /* Hokey's workaround */ ! #endif ! #ifdef Vomit ! { ! char *rs = regcode; ! #endif Vomit ! *OPERAND(ret) = len; ! #ifdef Vomit ! regcode = rs; ! } ! #endif Vomit regc('\0'); } break; --- 810,817 ---- *flagp |= HASWIDTH; if (len == 1) *flagp |= SIMPLE; ! if (regcode != ®dummy) ! *OPERAND(ret) = len; regc('\0'); } break; *************** *** 1221,1227 **** STATIC int regmatch(); STATIC int regrepeat(); - extern char sawampersand; extern int multiline; /* --- 1215,1220 ----