X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=patch%2Fpatches%2Fpatch-2.6.1-backup-if-mismatch.patch;fp=patch%2Fpatches%2Fpatch-2.6.1-backup-if-mismatch.patch;h=0ad0986c72c599a3f3c3dd40309d8f5813456dab;hb=e84b24e82329d16ca18bff7966d4f02d997bc965;hp=0000000000000000000000000000000000000000;hpb=802ea3af55e3167b6574e23b230cdbf0ed2ae0db;p=people%2Fpmueller%2Fipfire-3.x.git diff --git a/patch/patches/patch-2.6.1-backup-if-mismatch.patch b/patch/patches/patch-2.6.1-backup-if-mismatch.patch new file mode 100644 index 000000000..0ad0986c7 --- /dev/null +++ b/patch/patches/patch-2.6.1-backup-if-mismatch.patch @@ -0,0 +1,31 @@ +diff -up patch-2.6.1/src/patch.c.backup-if-mismatch patch-2.6.1/src/patch.c +--- patch-2.6.1/src/patch.c.backup-if-mismatch 2011-02-16 16:43:54.575850844 +0000 ++++ patch-2.6.1/src/patch.c 2011-02-16 16:44:56.907995789 +0000 +@@ -106,6 +106,7 @@ main (int argc, char **argv) + char numbuf[LINENUM_LENGTH_BOUND + 1]; + bool written_to_rejname = false; + bool apply_empty_patch = false; ++ bool posixly_correct_set; + + exit_failure = 2; + program_name = argv[0]; +@@ -125,7 +126,7 @@ main (int argc, char **argv) + i < 0 ? shell_quoting_style : (enum quoting_style) i); + } + +- posixly_correct = getenv ("POSIXLY_CORRECT") != 0; ++ posixly_correct_set = posixly_correct = getenv ("POSIXLY_CORRECT") != 0; + backup_if_mismatch = ! posixly_correct; + patch_get = ((val = getenv ("PATCH_GET")) + ? numeric_string (val, true, "PATCH_GET value") +@@ -151,6 +152,10 @@ main (int argc, char **argv) + Argv = argv; + get_some_switches(); + ++ /* Let --posix cause --no-backup-if-mismatch. */ ++ if (! posixly_correct_set && posixly_correct && backup_if_mismatch) ++ backup_if_mismatch = false; ++ + if (make_backups | backup_if_mismatch) + backup_type = get_version (version_control_context, version_control); +