[comp.unix.xenix] spiff on SCO Xenix 286

root@libove.UUCP (Jay M. Libove) (11/17/88)

I tried building "spiff" (the recently posted almost-diff) on my SCO
Xenix 286 (v2.2.1) system, and after having to reduce K_MAXTOKENS from
50000 to 15000 because of the segment size restriction on 80286 boxes,
everything worked until the load phase, when I got

/bin/ld: fatal error: common area longer than 65536 bytes

Okay, who's the culprit? What declarations in what files are so
big that there's over 64K of common space? (Author could answer this
best... I hope he sees this).

Anyway, has anyone else got spiff running on SCO 286 ?

-- 
Jay Libove		ARPA:	jl42@andrew.cmu.edu or libove@cs.cmu.edu
5731 Centre Ave, Apt 3	BITnet:	jl42@andrew or jl42@drycas
Pittsburgh, PA 15206	UUCP:	uunet!nfsun!libove!libove or
(412) 362-8983		UUCP:	psuvax1!pitt!darth!libove!libove

chip@ateng.ateng.com (Chip Salzenberg) (11/19/88)

According to root@libove.UUCP (Jay M. Libove):
>I tried building "spiff" (the recently posted almost-diff) on my SCO
>Xenix 286 (v2.2.1) system [...]

I have spiff running (slowly!) on my Xenix/286 system.  I used the following
patches.

Note:  If you're allergic to '286 brain damage, don't read this.

========================================================
Index: Makefile
*** Makefile.orig	Mon Nov 14 16:47:12 1988
--- Makefile	Mon Nov 14 17:31:30 1988
***************
*** 7,13 ****
  #	name of the directory into which the binary should be installed
  #		used only when you use  'make install'
  #
! INSDIR=/usr/tmp
  
  #
  #	choose one from each of 1) 2) and 3) below
--- 7,13 ----
  #	name of the directory into which the binary should be installed
  #		used only when you use  'make install'
  #
! INSDIR=/usr/local/bin
  
  #
  #	choose one from each of 1) 2) and 3) below
***************
*** 18,27 ****
  #		choose a) b) or c)
  #
  # a) for BSD derivitives, enable the following line
! OSFLAG=
  
  # b) for XENIX systems, enable the following line
! #OSFLAG=-DXENIX
  
  # b) for other A.T. and T. derivitives, enable the following line
  #OSFLAG=-DATT
--- 18,27 ----
  #		choose a) b) or c)
  #
  # a) for BSD derivitives, enable the following line
! #OSFLAG=
  
  # b) for XENIX systems, enable the following line
! OSFLAG=-DXENIX
  
  # b) for other A.T. and T. derivitives, enable the following line
  #OSFLAG=-DATT
***************
*** 66,72 ****
  #       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  #
  
! CC=cc
  OBJ= spiff.o output.o compare.o float.o strings.o exact.o miller.o parse.o command.o comment.o tol.o line.o token.o floatrep.o misc.o visual.o
  CFILES= spiff.c output.c compare.c float.c strings.c exact.c miller.c parse.c command.c comment.c tol.c line.c floatrep.c token.c misc.c visual.c
  HFILES=misc.h strings.h line.h float.h floatrep.h tol.h command.h comment.h token.h edit.h parse.h compare.h flagdefs.h exact.h miller.h visual.h output.h
--- 66,72 ----
  #       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  #
  
! CC=cc -M2l
  OBJ= spiff.o output.o compare.o float.o strings.o exact.o miller.o parse.o command.o comment.o tol.o line.o token.o floatrep.o misc.o visual.o
  CFILES= spiff.c output.c compare.c float.c strings.c exact.c miller.c parse.c command.c comment.c tol.c line.c floatrep.c token.c misc.c visual.c
  HFILES=misc.h strings.h line.h float.h floatrep.h tol.h command.h comment.h token.h edit.h parse.h compare.h flagdefs.h exact.h miller.h visual.h output.h
***************
*** 73,79 ****
  OTHER=README Makefile Sample.1 Sample.2 Sample.3 Sample.4 paper.ms paper.out
  MANPAGE=spiff.1
  
! CFLAGS=-O $(OSFLAG) $(TFLAG) $(VISFLAG)
  
  default: spiff
  
--- 73,79 ----
  OTHER=README Makefile Sample.1 Sample.2 Sample.3 Sample.4 paper.ms paper.out
  MANPAGE=spiff.1
  
! CFLAGS=-Me -K -O $(OSFLAG) $(TFLAG) $(VISFLAG)
  
  default: spiff
  
Index: misc.h
*** misc.h.orig	Mon Nov 14 16:46:29 1988
--- misc.h	Mon Nov 14 17:52:45 1988
***************
*** 42,47 ****
--- 42,49 ----
  extern char *strcpy();
  extern char *strncpy();
  extern char *malloc();
+ extern char *calloc();
+ extern char *getenv();
  
  extern void Z_complain();
  extern void Z_fatal();
Index: token.c
*** token.c.orig	Mon Nov 14 16:46:47 1988
--- token.c	Mon Nov 14 17:30:52 1988
***************
*** 14,21 ****
  #include "misc.h"
  #include "token.h"
  
! K_token _K_ato[K_MAXTOKENS]; /* storage for tokens */
! K_token _K_bto[K_MAXTOKENS];
  
  int _K_atm;
  int _K_btm;
--- 14,21 ----
  #include "misc.h"
  #include "token.h"
  
! K_token HUGE _K_ato[K_MAXTOKENS]; /* storage for tokens */
! K_token HUGE _K_bto[K_MAXTOKENS];
  
  int _K_atm;
  int _K_btm;
Index: token.h
*** token.h.orig	Mon Nov 14 16:46:51 1988
--- token.h	Mon Nov 14 17:30:52 1988
***************
*** 12,18 ****
  #include "tol.h"
  #include "strings.h"
  
! #define		K_MAXTOKENS	50000
  /*
  **	values for token type
  */
--- 12,18 ----
  #include "tol.h"
  #include "strings.h"
  
! #define         K_MAXTOKENS     30000
  /*
  **	values for token type
  */
***************
*** 36,43 ****
  **	this should really be a two dimensional array
  **	but i'm too lazy to recode it
  */
! extern K_token _K_ato[];	/* storage for the tokens */
! extern K_token _K_bto[];
  /*
  **	save token X from file
  */
--- 36,48 ----
  **	this should really be a two dimensional array
  **	but i'm too lazy to recode it
  */
! #if defined(XENIX) && defined(M_I286)
! # define HUGE huge
! #else
! # define HUGE /**/
! #endif
! extern K_token HUGE _K_ato[];   /* storage for the tokens */
! extern K_token HUGE _K_bto[];
  /*
  **	save token X from file
  */
-- 
Chip Salzenberg             <chip@ateng.com> or <uunet!ateng!chip>
A T Engineering             Me?  Speak for my company?  Surely you jest!
	   Beware of programmers carrying screwdrivers.

MichaelNC@cup.portal.com (Michael Kent Brady) (11/19/88)

I got spiff compiled, using the huge model, but when I tried to run it, 
my system says "not enough memory"  <sigh>.

Jay, you try the huge model, and I'll try reducing maxtokens, maybe one
of us will get it to work.

michaelnc@cup.portal.com