You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-devel/bison/files/bison-1.32-extfix.patch

29 lines
1.1 KiB

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");
}