From 9a8cec91e2132ccd638d08e2c020b7396557484737c52c6183410ee7e4cc9c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sat, 28 Sep 2013 08:18:17 +0000 Subject: [PATCH] Accepting request 201240 from home:AndreasSchwab:ff - location-eof-check.patch: Fix broken EOF check OBS-URL: https://build.opensuse.org/request/show/201240 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/bison?expand=0&rev=32 --- bison.changes | 5 +++++ bison.spec | 2 ++ location-eof-check.patch | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 location-eof-check.patch diff --git a/bison.changes b/bison.changes index 021eeee..7abaed9 100644 --- a/bison.changes +++ b/bison.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 27 20:13:38 UTC 2013 - schwab@linux-m68k.org + +- location-eof-check.patch: Fix broken EOF check + ------------------------------------------------------------------- Sat Aug 3 02:24:50 UTC 2013 - crrodriguez@opensuse.org diff --git a/bison.spec b/bison.spec index ba24a2f..fc31ba1 100644 --- a/bison.spec +++ b/bison.spec @@ -33,6 +33,7 @@ Group: Development/Languages/C and C++ Url: http://www.gnu.org/software/bison/bison.html Source: http://ftp.gnu.org/gnu/bison/bison-%{version}.tar.xz Source2: baselibs.conf +Patch: location-eof-check.patch Requires: m4 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,6 +42,7 @@ Bison is a parser generator similar to yacc(1). %prep %setup -q +%patch -p1 %build %configure --disable-silent-rules --disable-rpath \ diff --git a/location-eof-check.patch b/location-eof-check.patch new file mode 100644 index 0000000..3885984 --- /dev/null +++ b/location-eof-check.patch @@ -0,0 +1,13 @@ +Index: bison-3.0/src/location.c +=================================================================== +--- bison-3.0.orig/src/location.c ++++ bison-3.0/src/location.c +@@ -188,7 +188,7 @@ location_caret (location loc, FILE *out) + /* Read the actual line. Don't update the offset, so that we keep a pointer + to the start of the line. */ + { +- char c = getc (caret_info.source); ++ int c = getc (caret_info.source); + if (c != EOF) + { + /* Quote the file, indent by a single column. */