[comp.sources.bugs] patch 2.0 patch #12

lwall@devvax.JPL.NASA.GOV (Larry Wall) (06/24/88)

In article <583@hscfvax.harvard.edu> mohamed@hscfvax.harvard.edu (Mohamed Ellozy) writes:
: The bad news about patch #12 is that it has three hunks that fail, the
: first of patch.c, patch.man and Makefile.SH.
: 
: The good news is that these patches are easy to apply by hand, and that
: after applying them patch compiles on my machine, a VAX running Ultrix 1.2.


oops.


I was fooling around with a new version of dist's patch generator, and managed
to muck up the version states.  If you just edit the three reject files and
change Exp to Locked, you can apply the rejected hunks.  Or change them in
the original patch.  If you haven't applied the patch yet, here's a corrected
version (I've cancelled the old one):

System: patch version 2.0
Patch #: 12
Priority: LOW
Subject: some faulty declarations

Description:
	Certain systems were producing compilation errors and warnings due
	to some faulty declarations.

Fix:	From rn, say "| patch -p -N -d DIR", where DIR is your patch source
	directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".

	After patching:
		Configure -d
		make
		make install

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from me:

	Larry Wall
	lwall@jpl-devvax.jpl.nasa.gov

	If you send a mail message of the following form it will greatly speed
	processing:

	Subject: Command
	@SH mailpatch PATH patch 2.0 LIST
		   ^ note the c

	where PATH is a return path FROM ME TO YOU in Internet notation, and
	LIST is the number of one or more patches you need, separated by spaces,
	commas, and/or hyphens.  Saying 35- says everything from 35 to the end.

	You can also get the patches via anonymous FTP from
	jpl-devvax.jpl.nasa.gov (128.149.8.43).

Index: patchlevel.h
Prereq: 11
1c1
< #define PATCHLEVEL 11
---
> #define PATCHLEVEL 12

Index: MANIFEST
12a13
> config.h.SH              3 Produces config.h.

Index: Makefile.SH
Prereq: 2.0.1.1
*** Makefile.SH.old	Wed Jun 22 21:18:32 1988
--- Makefile.SH	Wed Jun 22 21:18:32 1988
***************
*** 3,11 ****
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 2.0.1.1 88/06/03 15:00:48 lwall Locked $
  #
  # $Log:	Makefile.SH,v $
  # Revision 2.0.1.1  88/06/03  15:00:48  lwall
  # patch10: upgraded to match some new metaconfig stuff
  # 
--- 3,14 ----
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 2.0.1.2 88/06/22 20:43:40 lwall Locked $
  #
  # $Log:	Makefile.SH,v $
+ # Revision 2.0.1.2  88/06/22  20:43:40  lwall
+ # patch12: config.h now depends on config.h.SH
+ # 
  # Revision 2.0.1.1  88/06/03  15:00:48  lwall
  # patch10: upgraded to match some new metaconfig stuff
  # 
***************
*** 55,60 ****
--- 58,66 ----
  
  patch: $(obj)
  	$(CC) $(LDFLAGS) $(obj) $(libs) -o patch
+ 
+ config.h: config.h.SH
+ 	sh config.h.SH
  
  # won't work with csh
  install: patch

Index: README
*** README.old	Wed Jun 22 21:18:35 1988
--- README	Wed Jun 22 21:18:36 1988
***************
*** 1,6 ****
  			Patch Kit, Version 2.0
  
! 		    Copyright (c) 1986, Larry Wall
  
  You may copy the patch kit in whole or in part as long as you don't try to
  make money off it, or pretend that you wrote it.
--- 1,6 ----
  			Patch Kit, Version 2.0
  
! 		    Copyright (c) 1988, Larry Wall
  
  You may copy the patch kit in whole or in part as long as you don't try to
  make money off it, or pretend that you wrote it.
***************
*** 46,54 ****
  5)  Read the manual entry before running patch.
  
  6)  IMPORTANT!  Help save the world!  Communicate any problems and
!     suggested patches to me, lwall@sdcrdcf.UUCP (Larry Wall), so we can
!     keep the world in sync.  If you have a problem, there's someone else
!     out there who either has had or will have the same problem.
  
      If possible, send in patches such that the patch program will apply them.
      Context diffs are the best, then normal diffs.  Don't send ed scripts--
--- 46,54 ----
  5)  Read the manual entry before running patch.
  
  6)  IMPORTANT!  Help save the world!  Communicate any problems and
!     suggested patches to me, lwall@jpl-devvax.Jpl.Nasa.Gov (Larry Wall),
!     so we can keep the world in sync.  If you have a problem, there's
!     someone else out there who either has had or will have the same problem.
  
      If possible, send in patches such that the patch program will apply them.
      Context diffs are the best, then normal diffs.  Don't send ed scripts--

Index: common.h
Prereq: 2.0.1.1
*** common.h.old	Wed Jun 22 21:18:39 1988
--- common.h	Wed Jun 22 21:18:40 1988
***************
*** 1,6 ****
! /* $Header: common.h,v 2.0.1.1 88/06/03 15:01:56 lwall Exp $
   *
   * $Log:	common.h,v $
   * Revision 2.0.1.1  88/06/03  15:01:56  lwall
   * patch10: support for shorter extensions.
   * 
--- 1,9 ----
! /* $Header: common.h,v 2.0.1.2 88/06/22 20:44:53 lwall Locked $
   *
   * $Log:	common.h,v $
+  * Revision 2.0.1.2  88/06/22  20:44:53  lwall
+  * patch12: sprintf was declared wrong
+  * 
   * Revision 2.0.1.1  88/06/03  15:01:56  lwall
   * patch10: support for shorter extensions.
   * 
***************
*** 151,155 ****
  #ifdef CHARSPRINTF
  char *sprintf();
  #else
! int *sprintf();
  #endif
--- 154,158 ----
  #ifdef CHARSPRINTF
  char *sprintf();
  #else
! int sprintf();
  #endif

Index: patch.c
Prereq: 2.0.1.5
*** patch.c.old	Wed Jun 22 21:18:46 1988
--- patch.c	Wed Jun 22 21:18:49 1988
***************
*** 1,5 ****
  char rcsid[] =
! 	"$Header: patch.c,v 2.0.1.5 88/06/03 15:09:37 lwall Locked $";
  
  /* patch - a program to apply diffs to original files
   *
--- 1,5 ----
  char rcsid[] =
! 	"$Header: patch.c,v 2.0.1.6 88/06/22 20:46:39 lwall Locked $";
  
  /* patch - a program to apply diffs to original files
   *
***************
*** 9,14 ****
--- 9,17 ----
   * money off of it, or pretend that you wrote it.
   *
   * $Log:	patch.c,v $
+  * Revision 2.0.1.6  88/06/22  20:46:39  lwall
+  * patch12: rindex() wasn't declared
+  * 
   * Revision 2.0.1.5  88/06/03  15:09:37  lwall
   * patch10: exit code improved.
   * patch10: better support for non-flexfilenames.
***************
*** 288,293 ****
--- 291,297 ----
  		Strcpy(rejname, outname);
  #ifndef FLEXFILENAMES
  		{
+ 		    char *rindex();
  		    char *s = rindex(rejname,'/');
  
  		    if (!s)

Index: patch.man
Prereq: 2.0.1.1
*** patch.man.old	Wed Jun 22 21:18:56 1988
--- patch.man	Wed Jun 22 21:18:57 1988
***************
*** 1,7 ****
  .rn '' }`
! ''' $Header: patch.man,v 2.0.1.1 88/06/03 15:12:51 lwall Locked $
  ''' 
  ''' $Log:	patch.man,v $
  ''' Revision 2.0.1.1  88/06/03  15:12:51  lwall
  ''' patch10: -B switch was contributed.
  ''' 
--- 1,10 ----
  .rn '' }`
! ''' $Header: patch.man,v 2.0.1.2 88/06/22 20:47:18 lwall Locked $
  ''' 
  ''' $Log:	patch.man,v $
+ ''' Revision 2.0.1.2  88/06/22  20:47:18  lwall
+ ''' patch12: now avoids Bell System Logo
+ ''' 
  ''' Revision 2.0.1.1  88/06/03  15:12:51  lwall
  ''' patch10: -B switch was contributed.
  ''' 
***************
*** 47,56 ****
  '''     Bell System Logo is used as a dummy character.
  '''
  .ie n \{\
! .tr \(bs-\*(Tr
! .ds -- \(bs-
! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
  .ds L" ""
  .ds R" ""
  .ds L' '
--- 50,59 ----
  '''     Bell System Logo is used as a dummy character.
  '''
  .ie n \{\
! .tr \(*W-\*(Tr
! .ds -- \(*W-
! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  .ds L" ""
  .ds R" ""
  .ds L' '

Index: util.c
*** util.c.old	Wed Jun 22 21:19:01 1988
--- util.c	Wed Jun 22 21:19:03 1988
***************
*** 242,251 ****
--- 242,259 ----
      if (!reset) {
  	hupval = signal(SIGHUP, SIG_IGN);
  	if (hupval != SIG_IGN)
+ #ifdef VOIDSIG
  	    hupval = my_exit;
+ #else
+ 	    hupval = (int(*)())my_exit;
+ #endif
  	intval = signal(SIGINT, SIG_IGN);
  	if (intval != SIG_IGN)
+ #ifdef VOIDSIG
  	    intval = my_exit;
+ #else
+ 	    intval = (int(*)())my_exit;
+ #endif
      }
      Signal(SIGHUP, hupval);
      Signal(SIGINT, intval);

tgr@picuxa.UUCP (Dr. Emilio Lizardo) (06/24/88)

When I applied this patch on my System V machine, Configure flagged the
fact that this system can't support filenames longer that 14 characters.
However, the compile of util.c  bombed because it thought that ORIGEXT
(in common.h) was not defined.  I tried undeffing FLEXFILENAMES, but
it still got flagged, so I eventually just #defined FLEXFILENAMES so that
the compile would succeed.  I suppose that I may end up with a bunch of
xxxxxx.c.or files if I try to patch something with already long filenames,
but I can live with that.
-- 
Tom Gillespie  ( ...att!picuxa!tgr) | (attmail!tgillespie) (201) 952-1178
AT&T/EDS Product Integration Center  299 Jefferson Rd. Parsippany NJ 07054

"Don't take life so serious ... it ain't nohow permanent."  -- Walt Kelly

john@frog.UUCP (John Woods) (06/24/88)

In article <2306@devvax.JPL.NASA.GOV>, lwall@devvax.JPL.NASA.GOV (Larry Wall) writes:
> System: patch version 2.0
> Patch #: 12
> Priority: LOW
> Subject: some faulty declarations
> 
I tried installing these patches and got some rejected hunks.  On further
exploration, I discovered that the reason was the SCCS control strings --
either the files I had were marked "Locked" and the patch was based on "Exp",
or the other way around.  Perhaps patch could be trained to ignore this
particular difference (sort of like ignoring whitespace, but a lot harder).

-- 
John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu

	Guns don't kill people; I kill people.