On Feb 16, 2005, at 06:03, Markus Gerwinski wrote:
Jan Ruzicka wrote:
b) there can be a problem with the line endings (CRLF vs CR / LF). The file gcc.c on your system may have different line endings then the used patch file. The difference in line endings may prevent patch from matching the surrounding blocks of code. (dos2unix is your friend)
The patch file really contained ^Ms. However, removing them didn't change things.
I also doubt it has anything to do with the paths. What I did was this:
- file to change: $MYPATH/gcc-3.2.3/gcc/gcc.c
- path in the patch file: gcc/gcc/gcc.c
So I did `cd $MYPATH/gcc-3.2.3' and then `patch -p1 < ../gcc.c.patch'. That should have done the trick, shouldn't it?
Yours,
Markus
You are right about the paths. If the file names did not match then the patch would ask you for a file name.
Is the original file the same? It should be the -- file.
Try to go to the lines mentioned in the patch and look for the surrounding blocks.
example: first hunk: @@ -328,7 +328,7 @@ static void add_preprocessor_option PARAMS ((const char *, int)); static void add_assembler_option PARAMS ((const char *, int)); static void add_linker_option PARAMS ((const char *, int)); -static void process_command PARAMS ((int, const char *const *)); +static void process_command PARAMS ((int, const char **)); static int execute PARAMS ((void)); static void alloc_args PARAMS ((void)); static void clear_args PARAMS ((void));
open the gcc.c file in vi +328 gcc.c and the cursor should be on line: "static void add_preprocessor_option PARAMS ((const char *, int));"
Jan Ruzicka