# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../uclibc/patches/bison-30-warn_redefined.patch # Copyright (C) 2004 - 2010 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Warn symbol is part of libc.o, use a difference name. --- bison-2.4.1/src/complain.c.orig 2009-02-20 14:57:21.000000000 +0100 +++ bison-2.4.1/src/complain.c 2009-02-20 14:57:55.000000000 +0100 @@ -94,7 +94,7 @@ } void -warn (const char *message, ...) +warn_bison (const char *message, ...) { set_warning_issued (); ERROR_MESSAGE (NULL, _("warning"), message); --- bison-2.4.1/src/complain.h.orig 2009-02-20 14:55:49.000000000 +0100 +++ bison-2.4.1/src/complain.h 2009-02-20 14:57:00.000000000 +0100 @@ -25,7 +25,7 @@ /** Informative messages, but we proceed. */ -void warn (char const *format, ...) +void warn_bison (char const *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); void warn_at (location loc, char const *format, ...) --- bison-2.4.2/src/files.c.orig 2010-02-25 05:56:42.000000000 +0100 +++ bison-2.4.2/src/files.c 2010-04-23 12:28:56.000000000 +0200 @@ -366,7 +366,7 @@ output_file_name_check (char **file_name for (i = 0; i < file_names_count; i++) if (0 == strcmp (file_names[i], *file_name)) { - warn (_("conflicting outputs to file %s"), + warn_bison (_("conflicting outputs to file %s"), quote (*file_name)); conflict = true; } --- bison-2.4.1/src/conflicts.c.orig 2009-02-20 15:08:17.000000000 +0100 +++ bison-2.4.1/src/conflicts.c 2009-02-20 15:07:59.000000000 +0100 @@ -579,7 +579,7 @@ if (! glr_parser && rrc_total > 0 && expected_rr_conflicts != -1) { - warn (_("%%expect-rr applies only to GLR parsers")); + warn_bison (_("%%expect-rr applies only to GLR parsers")); expected_rr_conflicts = -1; } --- bison-2.4.1/src/scan-skel.l.orig 2009-02-20 15:15:07.000000000 +0100 +++ bison-2.4.1/src/scan-skel.l 2009-02-20 15:17:00.000000000 +0100 @@ -186,14 +186,14 @@ fail_for_at_directive_too_many_args (at_directive_argv[0]); fputs (last_component (at_directive_argv[1]), yyout); } - else if (0 == strcmp (at_directive_argv[0], "@warn") + else if (0 == strcmp (at_directive_argv[0], "@warn_bison") || 0 == strcmp (at_directive_argv[0], "@complain") || 0 == strcmp (at_directive_argv[0], "@fatal")) { void (*func)(char const *, ...); switch (at_directive_argv[0][1]) { - case 'w': func = warn; break; + case 'w': func = warn_bison; break; case 'c': func = complain; break; case 'f': func = fatal; break; default: aver (false); break;