[comp.sources.d] PATCH patch 10 problem

abrams@bnlux0.bnl.gov (Karl L. Abrams) (06/17/88)

	We have been using PATCH here at BNL for quite a while with great success.
Today, I attempted to apply patch #10 and failed.  Our system is Ultrix2.0 running
on a VAX 11/780. After unsharing the patch and running Config, 'make' barfed. 

#<8> make
cc -c -O  patch.c
"./common.h", line 154: redeclaration of sprintf
"patch.c", line 291: warning: illegal combination of pointer and integer, op =
*** Error code 1

Stop.
-------------------------------------------------------------------------------------------------
	Lines 151-155 of common.h look like:
#ifdef CHARSPRINTF
char *sprintf();
#else
int *sprintf();
#endif

	Config said "Your sprintf() returns (char*)", so why did common.h try to
redefine sprintf at line 154?   Hmmmm...config.h.SH has the following:

/* CHARSPRINTF:
 *	This symbol is defined if this system declares "char *sprintf()" in
 *	stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
 *	is up to the package author to declare sprintf correctly based on the
 *	symbol.
 */
#$d_charsprf	CHARSPRINTF 	/**/



	The offending line in patch.c is:
		    char *s = rindex(rejname,'/');

Does anyone have any ideas as to why Make is barfing?  Any help will be much appreciated.


-- 
INTERNET:	abrams@bnlux0.bnl.gov
BITNET:		abrams@bnlux0.BITNET
UUCP:		...philabs!sbcs!bnlux0!abrams

scott@bu-ma.bu.edu (Scott Sutherland) (06/19/88)

In article <565@bnlux0.bnl.gov> abrams@bnlux0.bnl.gov (Karl L. Abrams) writes:

> We have been using PATCH here at BNL for quite a while with great
> success.  Today, I attempted to apply patch #10 and failed.  Our
> system is Ultrix2.0 running on a VAX 11/780. After unsharing the patch
> and running Config, 'make' barfed.
> 
>    #<8> make
>    cc -c -O  patch.c
>    "./common.h", line 154: redeclaration of sprintf
>    "patch.c", line 291: warning: illegal combination of pointer and integer, op =
>    *** Error code 1
> 
>    Stop.

I had the same trouble, until I noticed that I had an old config.h
lying around.  Config doesn't rebuild it from config.h.SH (since its
not in the MANIFEST file) if there is already one there.  Try removing
the old one, then Config, then make.  It worked for me.


	Scott Sutherland			
	scott@bu-ma.bu.edu
	Boston University Math Department

wisner@killer.UUCP (Bill Wisner) (06/20/88)

Patch 11 is considered a part of patch 10. Both should be installed
and Configure re-run before you try building.
-- 
Bill Wisner
..!{ames,decwrl,mit-eddie,osu-cis,rutgers}!killer!wisner