Most Unix or Linux systems by default have the "patch" utility. First, just check and make sure patch is installed on your system: enter "patch --h". If it doesn't return anything, then you will need to search to see if it is in a non-standard location, or you might need to specify the full path, such as /usr/local/bin/patch.
Anyway, the basic syntax to apply a patch to a source tree is "patch -p0 < patch_name.diff", where "patch_name.diff" is the name of your patch, and you are running this command from the root directory of a source tree. (the -p0 part specifies how many directories you strip off the front of the path, depending on where you are starting)
Note: the patch is available for download as a .diff.gz file, so it will need to be uncompressed. However, since it is using gzip, and most browsers transparently support gzip, its possible that the file will be automatically uncompressed as you download or view it.
For more info, try "man patch".
Here is the result when I did the patch (checking directory, then unzipping first):
Code:
bash-2.05$ pwd
/home/rick/php-4.1.0/main
bash-2.05$ gunzip rfc1867.c.diff-4.1.x.gz
bash-2.05$ patch -p0 < rfc1867.c.diff-4.1.x
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: rfc1867.c
|===================================================================
|RCS file: /repository/php4/main/rfc1867.c,v
|retrieving revision 1.71.2.1
|retrieving revision 1.71.2.2
|diff -u -r1.71.2.1 -r1.71.2.2
|--- rfc1867.c 24 Sep 2001 17:48:22 -0000 1.71.2.1
|+++ rfc1867.c 21 Feb 2002 18:46:45 -0000 1.71.2.2
--------------------------
Patching file rfc1867.c using Plan A...
Hunk #1 succeeded at 15.
Hunk #2 succeeded at 195.
done
bash-2.05$
-------------------------------------------
"Calculus is just the meaningless manipulation of higher symbols"
-unknown F student