The program patch has always been somewhat weak when creating
new files. Indeed, for an ordinary diff between path1 and path2,
usually only one of the two paths exists, and patch knows which
file to patch. But for a new file patch chooses essentially at random
where to create it (namely, the shortest pathname will be created).
This is often wrong.
The present, fixed, patch (version 2.1a) regards creating a new file
as a two-stage process: modifying a directory to create a new empty
file, followed by modifying this empty file.
Now we can apply the old heuristic, and create the new file in an
already existing directory, if possible.
As a result, the alpha diffs between 386/path/foo and linux/path/foo
will now work correctly. As a side result, patch will usually also
work correctly for people who patch the Linux kernel tree and forget
the -p flag.
The fixed patch can be found in ftp.win.tue.nl:/pub/linux/gnu-fixed
in patch-2.1a.tar.gz .