perl 3.0 pl6 is running on Microport 2.4

Don Mears dwm at msc.umn.edu
Mon Dec 18 05:21:02 AEST 1989


Here are the steps to get perl patchlevel 6 running on Microport Un*x 2.4.

(1) Get the directory routines (opendir, readdir, etc) from an archive 
    somewhere.   I got mine from uunet:  comp.sources.unix/volume9/gwyn-dir-lib
    and comp.sources.unix/volume10/dir-lib.pch.   Compile a large memory
    version of the library and put it in /usr/lib/large/dir.a.  Also put
    the dir.h include file in /usr/include/sys.

(2) Configure causes sh to get a segmentation fault when it reads does the
    ". config.sh" near line 2551.   You will have to remove that line 
    from Configure and make sure you get your configuration info right 
    the first time or start over if you make a mistake.  

(3) If you are using C-shell, put a blank line at the start of Configure so it
    wont get executed by the C-shell.   If you are using ksh, you will have to
    execute Configure with 'sh Configure'.  Configure does not work with
    ksh.

(4) When you run Configure, select compilation option -DCRIPPLED_CC.
    I also selected -DDEBUGGING to make debugging easier.  I recommend it.
    You can use -O, but you will then have to compile consarg.c and util.c
    separately without -O because the optimizer generates bad code for these
    routines.   The optimizer also dies harmlessly while optimizing cmd.c,
    eval.c (who can blame it?), and toke.c.   I am still trying to isolate
    the remaining optimization problems in consarg.c and util.c.

(5) After you run Configure, you will get a config.h file that has 
    I_SYSTIMETOO and I_TIMETOO defined.   These will cause compilation
    errors because time.h will be included twice.   Just undefine both of 
    these.

(6) Then apply the patches that follow.   They just circumvent compiler bugs
    except for the patch to x2p/a2p.h which shrinks an array that was too large
    for and 80286 segment.  The patches are simple enough that they can be
    easily applied by hand even if you don't have patch.   The stab.c and
    stab.h part redefines complex macros as functions and the toke.c
    part assigns the result of a type double function to a dummy double 
    variable instead of casting it to void.   Be sure to keep    
    the original code around so you can restore it before installing
    any official patchs from Larry Wall.

Followups to comp.unix.microport

Unofficial unauthorized patches... Use at you own risk!
Good luck  (with a 80286 + uport, you will need it)

#! /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:
#	perl.uport
# This archive created: Sun Dec 17 11:51:32 1989
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'perl.uport'" '(3514 characters)'
if test -f 'perl.uport'
then
	echo shar: "will not over-write existing file 'perl.uport'"
else
sed 's/^x//' << \SHAR_EOF > 'perl.uport'
x*** stab.h.old	Sun Oct 29 15:50:34 1989
x--- stab.h	Sun Dec 17 10:35:37 1989
x***************
x*** 29,41 ****
x--- 29,49 ----
x  #define stab_io(stab)		(((STBP*)(stab->str_ptr))->stbp_io)
x  #define stab_form(stab)		(((STBP*)(stab->str_ptr))->stbp_form)
x  #define stab_xarray(stab)	(((STBP*)(stab->str_ptr))->stbp_array)
x+ #ifdef	CRIPPLED_CC	/* Microport 2.4 hack */
x+ ARRAY *stab_array();
x+ #else
x  #define stab_array(stab)	(((STBP*)(stab->str_ptr))->stbp_array ? \
x  				 ((STBP*)(stab->str_ptr))->stbp_array : \
x  				 ((STBP*)(aadd(stab)->str_ptr))->stbp_array)
x+ #endif
x  #define stab_xhash(stab)	(((STBP*)(stab->str_ptr))->stbp_hash)
x+ #ifdef	CRIPPLED_CC	/* Microport 2.4 hack */
x+ HASH *stab_hash();
x+ #else
x  #define stab_hash(stab)		(((STBP*)(stab->str_ptr))->stbp_hash ? \
x  				 ((STBP*)(stab->str_ptr))->stbp_hash : \
x  				 ((STBP*)(hadd(stab)->str_ptr))->stbp_hash)
x+ #endif			/* Microport 2.4 hack */
x  #define stab_sub(stab)		(((STBP*)(stab->str_ptr))->stbp_sub)
x  #define stab_lastexpr(stab)	(((STBP*)(stab->str_ptr))->stbp_lastexpr)
x  #define stab_line(stab)		(((STBP*)(stab->str_ptr))->stbp_line)
x*** stab.c.old	Mon Nov 27 17:02:58 1989
x--- stab.c	Sun Dec 17 10:35:30 1989
x***************
x*** 30,35 ****
x--- 30,60 ----
x  extern int sys_nerr;
x  extern char *sys_errlist[];
x  
x+ #ifndef	stab_array	/* Microport 2.4 hack */
x+ ARRAY *
x+ stab_array(stab)
x+ register STAB *stab;
x+ {
x+     register ARRAY *a = ((STBP*)(stab->str_ptr))->stbp_array;
x+     if( a == 0 ) a = ((STBP*)(aadd(stab)->str_ptr))->stbp_array;
x+     return( a );
x+ }
x+ #endif			/* Microport 2.4 hack */
x+ 
x+ #ifndef	stab_hash	/* Microport 2.4 hack */
x+ HASH *
x+ stab_hash(stab)
x+ register STAB *stab;
x+ {
x+     register HASH *h = ((STBP*)(stab->str_ptr))->stbp_hash;
x+     if( h == 0 ) h = ((STBP*)(hadd(stab)->str_ptr))->stbp_hash;
x+     return( h);
x+ }
x+ #endif			/* Microport 2.4 hack */
x+ 
x+ 
x+ 
x+ 
x  STR *
x  stab_str(str)
x  STR *str;
x***************
x*** toke.c.old	Mon Nov 27 17:03:03 1989
x--- toke.c	Sun Dec 17 10:35:51 1989
x***************
x*** 1675,1681 ****
x--- 1675,1685 ----
x  	  out:
x  	    (void)sprintf(tokenbuf,"%ld",i);
x  	    arg[1].arg_ptr.arg_str = str_make(tokenbuf,strlen(tokenbuf));
x+ #ifdef CRIPPLED_CC	/* Microport 2.4 hack */
x+ 	    { double zz = str_2num(arg[1].arg_ptr.arg_str); }
x+ #else
x  	    (void)str_2num(arg[1].arg_ptr.arg_str);
x+ #endif		/* Microport 2.4 hack */
x  	}
x  	break;
x      case '1': case '2': case '3': case '4': case '5':
x***************
x*** 1707,1713 ****
x--- 1711,1721 ----
x  	}
x  	*d = '\0';
x  	arg[1].arg_ptr.arg_str = str_make(tokenbuf, d - tokenbuf);
x+ #ifdef CRIPPLED_CC	/* Microport 2.4 hack */
x+ 	{ double zz = str_2num(arg[1].arg_ptr.arg_str); }
x+ #else
x  	(void)str_2num(arg[1].arg_ptr.arg_str);
x+ #endif		/* Microport 2.4 hack */
x  	break;
x      case '<':
x  	if (*++s == '<') {
x*** x2p/a2p.h.old	Mon Nov 13 10:05:59 1989
x--- x2p/a2p.h	Sun Dec 17 11:01:19 1989
x***************
x*** 213,223 ****
x  
x  EXT int mop INIT(1);
x  
x! #define OPSMAX 50000
x! union {
x      int ival;
x      char *cval;
x! } ops[OPSMAX];		/* hope they have 200k to spare */
x  
x  #include <stdio.h>
x  #include <ctype.h>
x--- 213,228 ----
x  
x  EXT int mop INIT(1);
x  
x! union u_ops {
x      int ival;
x      char *cval;
x! };
x! #if defined(iAPX286) || defined(M_I286) || defined(I80286) 	/* 80286 hack */
x! #define OPSMAX (64000/sizeof(union u_ops))	/* approx. max segment size */
x! #else
x! #define OPSMAX 50000
x! #endif						 	/* 80286 hack */
x! union u_ops ops[OPSMAX];
x  
x  #include <stdio.h>
x  #include <ctype.h>
SHAR_EOF
if test 3514 -ne "`wc -c < 'perl.uport'`"
then
	echo shar: "error transmitting 'perl.uport'" '(should have been 3514 characters)'
fi
fi
exit 0
#	End of shell archive



More information about the Comp.unix.microport mailing list