How to apply patches?

Bruce Stephens bruce.stephens@messagingdirect.com
Tue Aug 1 05:08:00 GMT 2000


Bruce Stephens <bruce.stephens@messagingdirect.com> writes:

[...]

> Presumably somewhere there's a patch where you can tell it to use
> Index, ignoring other pathnames.  Indeed, that would seem to me to
> be sane behaviour---if there's an Index line present, then surely
> whoever generated the patch knew what they were doing.

Here's a quick hack to patch-2.5.4.  It changes the behaviour of
patch, so you probably don't want to install it widely.  If an Index:
line is found, then it gets used, regardless.  (Probably it would be
better to change the ordering, putting Index: before the old and new
paths, but that's not necessary for these patches.)

*** pch.c~      Mon Aug 30 07:20:08 1999
--- pch.c       Tue Aug  1 13:01:30 2000
***************
*** 513,522 ****
        {
        enum nametype i0 = NONE;
  
!       if (! posixly_correct && (name[OLD] || name[NEW]) && name[INDEX])
          {
!           free (name[INDEX]);
!           name[INDEX] = 0;
          }
  
        for (i = OLD;  i <= INDEX;  i++)
--- 513,524 ----
        {
        enum nametype i0 = NONE;
  
!       if (! posixly_correct && name[INDEX])
          {
!           free (name[OLD]);
!           name[OLD] = 0;
!           free (name[NEW]);
!           name[NEW] = 0;
          }
  
        for (i = OLD;  i <= INDEX;  i++)


-- 
Bruce Stephens			Bruce.Stephens@MessagingDirect.com
MessagingDirect(UK) Ltd		<URL: http://www.MessagingDirect.com/ >



More information about the Sourcenav mailing list