parent
6c7ed39187
commit
04f3d2917a
@ -1 +1 @@
|
|||||||
bison-2.3.tar.bz2
|
bison-2.4.tar.bz2
|
||||||
|
87
bison-2.4-reap_subpipe.patch
Normal file
87
bison-2.4-reap_subpipe.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
diff -urp bison-2.4-pm/lib/subpipe.c bison-2.4/lib/subpipe.c
|
||||||
|
--- bison-2.4-pm/lib/subpipe.c 2008-07-14 10:56:12.000000000 +0200
|
||||||
|
+++ bison-2.4/lib/subpipe.c 2008-11-20 14:37:42.000000000 +0100
|
||||||
|
@@ -143,7 +143,9 @@ create_subpipe (char const * const *argv
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-/* Wait for the subprocess to exit. */
|
||||||
|
+/* Wait for the subprocess to exit. PROGRAM==NULL means errors
|
||||||
|
+ shouldn't be emitted, typically becuase we are reaping the subpipe
|
||||||
|
+ in response to some other error. */
|
||||||
|
|
||||||
|
void
|
||||||
|
reap_subpipe (pid_t pid, char const *program)
|
||||||
|
@@ -151,11 +153,14 @@ reap_subpipe (pid_t pid, char const *pro
|
||||||
|
#if HAVE_WAITPID || defined waitpid
|
||||||
|
int wstatus;
|
||||||
|
if (waitpid (pid, &wstatus, 0) < 0)
|
||||||
|
- error (EXIT_FAILURE, errno, "waitpid");
|
||||||
|
+ {
|
||||||
|
+ if (program)
|
||||||
|
+ error (EXIT_FAILURE, errno, "waitpid");
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1;
|
||||||
|
- if (status)
|
||||||
|
+ if (status && program)
|
||||||
|
error (EXIT_FAILURE, 0,
|
||||||
|
_(status == 126
|
||||||
|
? "subsidiary program `%s' could not be invoked"
|
||||||
|
diff -urp bison-2.4-pm/src/output.c bison-2.4/src/output.c
|
||||||
|
--- bison-2.4-pm/src/output.c 2008-11-02 19:09:10.000000000 +0100
|
||||||
|
+++ bison-2.4/src/output.c 2008-11-20 14:39:08.000000000 +0100
|
||||||
|
@@ -467,6 +467,21 @@ prepare_actions (void)
|
||||||
|
| Call the skeleton parser. |
|
||||||
|
`---------------------------*/
|
||||||
|
|
||||||
|
+static pid_t pid = 0;
|
||||||
|
+
|
||||||
|
+/* Clean up opened pipe. */
|
||||||
|
+static void
|
||||||
|
+die (void)
|
||||||
|
+{
|
||||||
|
+ static int dying = 0;
|
||||||
|
+ if (pid && !dying)
|
||||||
|
+ {
|
||||||
|
+ dying = 1;
|
||||||
|
+ reap_subpipe (pid, NULL);
|
||||||
|
+ pid = 0;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
output_skeleton (void)
|
||||||
|
{
|
||||||
|
@@ -474,7 +489,6 @@ output_skeleton (void)
|
||||||
|
FILE *out;
|
||||||
|
int filter_fd[2];
|
||||||
|
char const *argv[9];
|
||||||
|
- pid_t pid;
|
||||||
|
|
||||||
|
/* Compute the names of the package data dir and skeleton files. */
|
||||||
|
char const m4sugar[] = "m4sugar/m4sugar.m4";
|
||||||
|
@@ -586,6 +600,7 @@ output_skeleton (void)
|
||||||
|
scan_skel (in);
|
||||||
|
xfclose (in);
|
||||||
|
reap_subpipe (pid, m4);
|
||||||
|
+ pid = 0;
|
||||||
|
timevar_pop (TV_M4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -653,6 +669,14 @@ prepare (void)
|
||||||
|
void
|
||||||
|
output (void)
|
||||||
|
{
|
||||||
|
+ /* Register shutdown handler. */
|
||||||
|
+ static int registered = 0;
|
||||||
|
+ if (!registered)
|
||||||
|
+ {
|
||||||
|
+ registered = 1;
|
||||||
|
+ atexit (die);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
obstack_init (&format_obstack);
|
||||||
|
|
||||||
|
prepare_symbols ();
|
13
bison.spec
13
bison.spec
@ -1,13 +1,14 @@
|
|||||||
Summary: A GNU general-purpose parser generator
|
Summary: A GNU general-purpose parser generator
|
||||||
Name: bison
|
Name: bison
|
||||||
Version: 2.3
|
Version: 2.4
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.bz2
|
Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.bz2
|
||||||
|
Patch1: bison-2.4-reap_subpipe.patch
|
||||||
URL: http://www.gnu.org/software/bison/
|
URL: http://www.gnu.org/software/bison/
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
BuildRequires: m4 >= 1.4
|
BuildRequires: m4 >= 1.4 java-1.6.0-openjdk-devel
|
||||||
Requires: m4 >= 1.4
|
Requires: m4 >= 1.4
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
@ -61,6 +62,7 @@ Bison manual section for more information.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -77,6 +79,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
# Remove unpackaged files.
|
# Remove unpackaged files.
|
||||||
rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
|
rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
|
||||||
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
||||||
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
%find_lang %{name}-runtime
|
%find_lang %{name}-runtime
|
||||||
@ -112,6 +115,10 @@ fi
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 12 2008 Petr Machata <pmachata@redhat.com> - 2.4-1
|
||||||
|
- Rebase to 2.4
|
||||||
|
- Resolves: #471183
|
||||||
|
|
||||||
* Mon Sep 15 2008 Petr Machata <pmachata@redhat.com> - 2.3-6
|
* Mon Sep 15 2008 Petr Machata <pmachata@redhat.com> - 2.3-6
|
||||||
- Merge review:
|
- Merge review:
|
||||||
- Drop terminating dot from Summary
|
- Drop terminating dot from Summary
|
||||||
|
Loading…
Reference in New Issue
Block a user