summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/bison/files/bison-1.32-extfix.patch')
-rw-r--r--sys-devel/bison/files/bison-1.32-extfix.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys-devel/bison/files/bison-1.32-extfix.patch b/sys-devel/bison/files/bison-1.32-extfix.patch
new file mode 100644
index 000000000000..363d038d8a52
--- /dev/null
+++ b/sys-devel/bison/files/bison-1.32-extfix.patch
@@ -0,0 +1,28 @@
+2002-02-15 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
+
+ * src/files (compute_exts_from_gf, compute_exts_from_src): Handle
+ the case where header_extension is the same as src_extension, aka
+ handle -d -o <file> where <file> doesn't have a known EXT to
+ transform. e.g. if <file> is <something>.yxx, set the
+ header_extension to <something>.yxx.h, as would do bison 1.28.
+
+--- bison-1.32/src/files.c.extfix Mon Jan 21 16:41:46 2002
++++ bison-1.32/src/files.c Fri Feb 15 15:40:43 2002
+@@ -288,6 +288,8 @@ compute_exts_from_gf (const char *ext)
+ src_extension = tr (src_extension, 'Y', 'C');
+ header_extension = tr (ext, 'y', 'h');
+ header_extension = tr (header_extension, 'Y', 'H');
++ if (!strcmp (header_extension, src_extension))
++ header_extension = concat2 (src_extension, ".h");
+ }
+
+ /* Computes extensions from the given c source file extension. */
+@@ -300,6 +302,8 @@ compute_exts_from_src (const char *ext)
+ src_extension = xstrdup (ext);
+ header_extension = tr (ext, 'c', 'h');
+ header_extension = tr (header_extension, 'C', 'H');
++ if (!strcmp (header_extension, src_extension))
++ header_extension = concat2 (src_extension, ".h");
+ }
+
+