[comp.os.minix] patch to make M4 Sources running under MINIX

XBR1YD3E%DDATHD21.BITNET@cunyvm.cuny.edu (09/06/89)

Here a the patches to run the M4-macroprozessor under MINIX.
The diffs are relative to the posting which was sent a week or two
ago to this news-group.
The makefile is for MINIX/PC (.s instead of .o suffixes).

--------------------------- cut here -----------------------------------
echo x - m4.cdiff
sed '/^X/s///' > m4.cdiff << '/'
X*** original/extr.h    Sat Sep  2 21:01:56 1989
X--- extr.h     Sat Sep  2 18:49:19 1989
X***************
X*** 5,12 ****
X  extern stae mstack[];                /* stack of m4 machine         */
X  extern char *ep;             /* first free char in strspace */
X  extern char *endest;         /* end of string space         */
X! int sp;                      /* current m4  stack pointer   */
X! int fp;                      /* m4 call frame pointer       */
X  extern FILE *infile[];               /* input file stack (0=stdin)  */
X  extern FILE *outfile[];              /* diversion array(0=bitbucket)*/
X  extern FILE *active;         /* active output file pointer  */
X--- 5,12 ----
X  extern stae mstack[];                /* stack of m4 machine         */
X  extern char *ep;             /* first free char in strspace */
X  extern char *endest;         /* end of string space         */
X! extern int sp;                       /* current m4  stack pointer   */
X! extern int fp;                       /* m4 call frame pointer       */
X  extern FILE *infile[];               /* input file stack (0=stdin)  */
X  extern FILE *outfile[];              /* diversion array(0=bitbucket)*/
X  extern FILE *active;         /* active output file pointer  */
X*** original/makefile  Sat Sep  2 21:01:16 1989
X--- makefile   Sat Sep  2 20:36:44 1989
X***************
X*** 11,21 ****
X  #    -DDUFFCP
X  #            if you do not have fast memcpy in your library.
X  #
X! CC = rcc
X! CFLAGS = -O -lint -DEXTENDED
X! DEST =  /usr/local/bin
X! MANL =       /usr/man/manl
X! OBJS =  main.o eval.o serv.o look.o misc.o expr.o
X  CSRC =  main.c eval.c serv.c look.c misc.c expr.c
X  INCL =  mdef.h extr.h patchlevel.h
X  MSRC =  ack.m4 hanoi.m4 hash.m4 sqroot.m4 string.m4 test.m4
X--- 11,22 ----
X  #    -DDUFFCP
X  #            if you do not have fast memcpy in your library.
X  #
X! #CC = rcc
X! #CFLAGS = -O -lint -DEXTENDED
X! CFLAGS       = -DEXTENDED -DGETOPT -DDUFFCP -i
X! DEST =  /usr/local/bin
X! MANL =       /usr/man/manl
X! OBJS =  main.s eval.s serv.s look.s misc.s expr.s
X  CSRC =  main.c eval.c serv.c look.c misc.c expr.c
X  INCL =  mdef.h extr.h patchlevel.h
X  MSRC =  ack.m4 hanoi.m4 hash.m4 sqroot.m4 string.m4 test.m4
X***************
X*** 34,40 ****
X       lint -h ${CSRC}
X
X  install: m4
X!      install ./m4 ${DEST}/m4
X       cp ./m4.1 ${MANL}/m4.l
X
X  deinstall:
X--- 35,41 ----
X       lint -h ${CSRC}
X
X  install: m4
X!      cp ./m4 ${DEST}/m4
X       cp ./m4.1 ${MANL}/m4.l
X
X  deinstall:
X***************
X*** 58,64 ****
X       -diff pdm4.out unxm4.out
X       @rm -f pdm4.out unxm4.out
X  clean:
X!      rm -f *.o core m4 *.out M4MAIN.SHAR M4MSRC.SHAR
X  pack:
X       shar  makefile ${INCL} ${CSRC} >M4MAIN.SHAR
X       shar ${MSRC} ${DOCS} patchlevel.h >M4MSRC.SHAR
X--- 59,65 ----
X       -diff pdm4.out unxm4.out
X       @rm -f pdm4.out unxm4.out
X  clean:
X!      rm -f *.s core m4 *.out M4MAIN.SHAR M4MSRC.SHAR
X  pack:
X       shar  makefile ${INCL} ${CSRC} >M4MAIN.SHAR
X       shar ${MSRC} ${DOCS} patchlevel.h >M4MSRC.SHAR
X
/
---------------------------------------------------------------------------

M. Zaun, TH-Darmstadt, W.Germany

ast@cs.vu.nl (Andy Tanenbaum) (09/07/89)

In article <23326@louie.udel.EDU> XBR1YD3E%DDATHD21.BITNET@cunyvm.cuny.edu writes:
>Here a the patches to run the M4-macroprozessor under MINIX.
Newsgroups: comp.os.minix
Subject: Re: patch to make M4 Sources running under MINIX (PC tested)
Summary: 
Expires: 
References: <23326@louie.udel.EDU>
Sender: 
Reply-To: ast@cs.vu.nl (Andy Tanenbaum)
Followup-To: 
Distribution: 
Organization: VU Informatica, Amsterdam
Keywords: 

In article <23326@louie.udel.EDU> XBR1YD3E%DDATHD21.BITNET@cunyvm.cuny.edu writes:
>Here a the patches to run the M4-macroprozessor under MINIX.
I saw your patches after I reposted M4.   Actually, I had already made
them and got a binary, only it did nothing.  I find that sort of thing
quite frustrating.  Has anybody succeeded in making it behave properly?
What's the secret?


Andy Tanenbaum (ast@cs.vu.nl)

edb_tom@tor.nhh.no (Tom Ivar Helbekkmo) (09/08/89)

In article <3154@ast.cs.vu.nl>, ast@cs.vu.nl (Andy Tanenbaum) writes:
> In article <23326@louie.udel.EDU> XBR1YD3E%DDATHD21.BITNET@cunyvm.cuny.edu writes:
>>Here a the patches to run the M4-macroprozessor under MINIX.
> I saw your patches after I reposted M4.   Actually, I had already made
> them and got a binary, only it did nothing.  I find that sort of thing
> quite frustrating.  Has anybody succeeded in making it behave properly?
> What's the secret?

I modified M4 to run under Minix when it was first posted.  Looking at
the posted patches, I can't see that I've done anything different --
these were the very same changes I made.  It works perfectly for me, no
problems at all.

I run a pretty straightforward Minix 1.4a, but I have changed the stdio
level 2 code a bit, to make it conform better to "standard" Unix stdio. 
That may or may not have anything to do with it, as I haven't looked
closely at how M4 handles these things.

-tih

--
Tom Ivar Helbekkmo, NHH, Bergen, Norway.  Telephone:  +47-5-959205
edb_tom@tor.nhh.no, thelbekk@norunit.bitnet, helbekkmo@nhh.uninett