[comp.os.minix] Problem with cppmake for 1.5.10

nall@sun8.scri.fsu.edu (John Nall) (11/22/90)

Has anyone successfully made the revised version of cppmake
for 1.5.10 which Earl Chew released to the net on Nov 15th?

I've unpacked it, and all of the files seem to be ok, but
when I do either a "make -f makefile.min all" under regular
Minix 1.5.10 or a "make -f makefile.bcc all" under Minix-386,
I get the same error, which is:

      cppmake.c:" 1151.27 (macro level 1): x undeclared
      make: Error code 256

--
John W. Nall		| Supercomputation Computations Research Institute
nall@sun8.scri.fsu.edu  | Florida State University, Tallahassee, FL 32306
   WB4LOQ (why? I dunno....everyone else seems to be doing it.  _._)

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (11/23/90)

In <1447@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes:


>Has anyone successfully made the revised version of cppmake
>for 1.5.10 which Earl Chew released to the net on Nov 15th?

Yes. Messrs B Evans and E Chew have successfully compiled the program :-)

>I've unpacked it, and all of the files seem to be ok, but
>when I do either a "make -f makefile.min all" under regular
>Minix 1.5.10 or a "make -f makefile.bcc all" under Minix-386,
>I get the same error, which is:

>      cppmake.c:" 1151.27 (macro level 1): x undeclared
>      make: Error code 256

This, believe it or not, is actually not my fault. I posted about a typo in
sys/wait.h a long time ago. Ast says he's fixed it for the next release. Here
is the patch in uuencoded form (because of possible 80 character line
limitations).

-------------------------------------------------------------------------------
table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 wait.dif
M*BHJ("]G<F%P:&EC<R]M:6YI>"\Q+C4N,3 O:6YC;'5D92]S>7,O=V%I="YHz
M"51H=2!*86X@(#$@,3 Z,#0Z,SD@,3DW, HM+2T@+W1M<"]W86ET+F@)1G)Iy
M($YO=B R,R Q,#HQ-CHP-R Q.3DP"BHJ*BHJ*BHJ*BHJ*BHJ*@HJ*BH@,S$Lx
M,S,*(" C9&5F:6YE(%=415)-4TE'*',I"2A?3$]7*',I("8@,#$W-RD)"2 @w
M(" O*B!S:6<@=F%L=64@*B\*(2 C9&5F:6YE(%=)1E-)1TY!3$5$*',I"2@Hv
M*'5N<VEG;F5D(&EN="DH>"DM,2 F(#!X1D9&1BD@/" P>$9&*2 O*B!S:6=Nu
M86QE9" J+PH@("-D969I;F4@5TE&4U1/4%!%1"AS*0DH7TQ/5RAS*2 ]/2 Pt
M,3<W*0D)(" @("\J('-T;W!P960@*B\*"BTM+2 S,2PS,R M+2TM+0H@("-Ds
M969I;F4@5U1%4DU324<H<RD)*%],3U<H<RD@)B P,3<W*0D)(" @("\J('-Ir
M9R!V86QU92 J+PHA("-D969I;F4@5TE&4TE'3D%,140H<RD)*"@H=6YS:6=Nq
M960@:6YT*2AS*2TQ("8@,'A&1D9&*2 \(#!X1D8I("\J('-I9VYA;&5D("HOp
M"B @(V1E9FEN92!724935$]04$5$*',I"2A?3$]7*',I(#T](# Q-S<I"0D@o
1(" @+RH@<W1O<'!E9" J+PI0n
 m
end
-------------------------------------------------------------------------------

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146
----------------------------------------------------------------------

agm@stl.stc.co.uk (Andrew G. Minter) (11/23/90)

In article <1447@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes:
>Has anyone successfully made the revised version of cppmake
>for 1.5.10 which Earl Chew released to the net on Nov 15th?
>I get the same error, which is:
>
>      cppmake.c:" 1151.27 (macro level 1): x undeclared
>      make: Error code 256

This is because of a little typo in one of the Minix .h files.  I
don't remember the exact details right now and my Minix system is
at home, but if you grep to see which file defines the macro used
in the line 1151 you'll instantly see that there is an 'x' where there
should be an 's'.  It took me ages to find this, mainly because Minix
is now so robust that I don't expect to find this kind of problem.

Cheers, Andrew

eesrajm@cc.brunel.ac.uk (Andrew J Michael) (11/25/90)

In article <3390@bruce.cs.monash.OZ.AU>, cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes:
> In <1447@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes:
> 
> 
> >Has anyone successfully made the revised version of cppmake
> >for 1.5.10 which Earl Chew released to the net on Nov 15th?
> 
> Yes. Messrs B Evans and E Chew have successfully compiled the program :-)
> 
> >I've unpacked it, and all of the files seem to be ok, but
> >when I do either a "make -f makefile.min all" under regular
> >Minix 1.5.10 or a "make -f makefile.bcc all" under Minix-386,
> >I get the same error, which is:
> 
> >      cppmake.c:" 1151.27 (macro level 1): x undeclared
> >      make: Error code 256
> 
> This, believe it or not, is actually not my fault. I posted about a typo in
> sys/wait.h a long time ago. Ast says he's fixed it for the next release. Here
> is the patch in uuencoded form (because of possible 80 character line
> limitations).
> 

This doesn't actually seem to be the problem, unless I've got a different 
problem to everyone else :-)

My error message reads 

"cppmake.c", line 1167: unbalanced parenthesis
"cppmake.c", line 1218: unterminated macro call
"cppmake.c", line 1218: (warning) argument mismatch, F1V
"cppmake.c", line 1221: , deleted
"cppmake.c", line 1222: (warning) old-fashioned initialization, insert =
"cppmake.c", line 1222: q undefined
"cppmake.c", line 1226: identifier missing
"cppmake.c", line 1226: * applied to non-pointer (function)
"cppmake.c", line 1226: operator * on non-numerical operand (pointer)
"cppmake.c", line 1226: identifier missing
"cppmake.c", line 1226: operator * on non-numerical operand (pointer)
"cppmake.c", line 1226: (warning) etc ...
make: Error code 256

A look at line 1167 shows 

void appendarg F1V(PROCESS *, p,

this either wins first prize in an obfuscated C contest, or cppmake.c has been
mangled in transmission.  Trying crc gives

10928  32592 cppmake.c

Is this correct ??

Andy Michael


-- 
Andy Michael (eesrajm@cc.brunel.ac.uk)      " Emulation is the sincerest
85 Hawthorne Crescent                         form of pottery."
West Drayton
Middlesex                                    - William Frend De Morgan
UB7 9PA   

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (11/27/90)

In <1904@Terra.cc.brunel.ac.uk> eesrajm@cc.brunel.ac.uk (Andrew J Michael) writes:

>This doesn't actually seem to be the problem, unless I've got a different 
>problem to everyone else :-)

Hmm... the latter :-(

>My error message reads 

>"cppmake.c", line 1167: unbalanced parenthesis
>"cppmake.c", line 1218: unterminated macro call
>"cppmake.c", line 1218: (warning) argument mismatch, F1V
	[.. lots of diagnostics ..]

The offending code is:

void appendarg F1V(PROCESS *, p,

{
  VA_LIST, ap,				/* point at argument list */
  char *q;				/* point at argument */

  VA_START(ap, p);)

  [.. code deleted ..]
}

I don't know which cpp you're using. The problem seems to be that your cpp
gives up collecting macro arguments at \n just after "PROCESS *, p,".

The reason the code is written this way is to allow ANSI-style argument
declarations while allowing compilation under old-style compilers, and
also using varargs.h *or* stdarg.h. The strange parenthesis nesting allows
me to still use '%' in vi to match parentheses.

Try running cpp only on the file to see whether it's because your cpp gives
up the the \n. I have compiled this successfully using ack, bcc, gcc, Pyramid
cc and Sun cc.

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146
----------------------------------------------------------------------