From 35984ba60f41811a8c15a6a0a1b918069759a2bc Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Sep 24 2009 07:42:06 +0000 Subject: update to upstream alpha 1.06.95 (in use in Gentoo, Slackware for quite a long time, marked stable there), removed already applied patches, fix small memory leak (gentoo patch) --- diff --git a/.cvsignore b/.cvsignore index 1c96287..2adcf2b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -bc-1.06.tar.gz +bc-1.06.95.tar.bz2 diff --git a/bc-1.06-info_exp_bessel.patch b/bc-1.06-info_exp_bessel.patch deleted file mode 100644 index e3e778d..0000000 --- a/bc-1.06-info_exp_bessel.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- bc-1.06/doc/bc.info.info_exp_bessel 2003-08-12 14:57:45.000000000 +0200 -+++ bc-1.06/doc/bc.info 2003-08-12 14:57:51.000000000 +0200 -@@ -664,10 +664,10 @@ - `l (X)' - The natural logarithm of X. - --`E (X)' -+`e (X)' - The exponential function of raising E to the value X. - --`J (N,X)' -+`j (N,X)' - The bessel function of integer order N of X. - -  diff --git a/bc-1.06-readline42.patch b/bc-1.06-readline42.patch deleted file mode 100644 index 37dfaf5..0000000 --- a/bc-1.06-readline42.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- bc-1.06/bc/scan.l.sux Fri May 11 14:27:20 2001 -+++ bc-1.06/bc/scan.l Fri May 11 14:27:32 2001 -@@ -143,7 +143,6 @@ - - /* Definitions for readline access. */ - extern FILE *rl_instream; --_PROTOTYPE(char *readline, (char *)); - - /* rl_input puts upto MAX characters into BUF with the number put in - BUF placed in *RESULT. If the yy input file is the same as diff --git a/bc-1.06-s390.patch b/bc-1.06-s390.patch deleted file mode 100644 index 2ead293..0000000 --- a/bc-1.06-s390.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- bc-1.06/bc/load.c.s390 Wed Sep 13 20:22:38 2000 -+++ bc-1.06/bc/load.c Wed Sep 5 16:10:18 2001 -@@ -156,7 +156,10 @@ - long label_no; - long vaf_name; /* variable, array or function number. */ - long func; -- program_counter save_adr; -+ /* Make save_adr static. Otherwise the whole address save stuff doesn't make -+ any sense at all and break e.g. on S390. -+ 09/05/01 Phil Knirsch */ -+ static program_counter save_adr; - - /* Initialize. */ - str = code; diff --git a/bc-1.06-string.patch b/bc-1.06-string.patch deleted file mode 100644 index 2ec471b..0000000 --- a/bc-1.06-string.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- bc-1.06/lib/number.c.string 2007-07-26 15:01:34.000000000 +0200 -+++ bc-1.06/lib/number.c 2007-07-26 15:01:41.000000000 +0200 -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include /* Prototypes needed for external utility routines. */ - - #define bc_rt_warn rt_warn diff --git a/bc-1.06.95-memleak.patch b/bc-1.06.95-memleak.patch new file mode 100644 index 0000000..0b8fc5b --- /dev/null +++ b/bc-1.06.95-memleak.patch @@ -0,0 +1,26 @@ +diff --git a/bc/bc.y b/bc/bc.y +index 14dc4be..bd91c38 100644 +--- a/bc/bc.y ++++ b/bc/bc.y +@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_OP + generate (">"); + break; + } ++ free($2); + } + | expression '+' expression + { +diff --git a/bc/util.c b/bc/util.c +index 30beaf9..26e2e85 100644 +--- a/bc/util.c ++++ b/bc/util.c +@@ -602,8 +602,7 @@ lookup (name, namekind) + case FUNCTDEF: + if (id->f_name != 0) + { +- if (namekind != FUNCT) +- free(name); ++ free(name); + /* Check to see if we are redefining a math lib function. */ + if (use_math && namekind == FUNCTDEF && id->f_name <= 6) + id->f_name = next_func++; diff --git a/bc.spec b/bc.spec index 374c61b..af1cb99 100644 --- a/bc.spec +++ b/bc.spec @@ -1,16 +1,13 @@ Summary: GNU's bc (a numeric processing language) and dc (a calculator) Name: bc -Version: 1.06 -Release: 36%{?dist} +Version: 1.06.95 +Release: 1%{?dist} License: GPLv2+ URL: http://www.gnu.org/software/bc/ Group: Applications/Engineering -Source: ftp://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz -Patch1: bc-1.06-readline42.patch -Patch2: bc-1.06-s390.patch -Patch3: bc-1.06-info_exp_bessel.patch -Patch5: bc-1.06-string.patch -Patch6: bc-1.06-dc_ibase.patch +Source: ftp://alpha.gnu.org/pub/gnu/bc/bc-%{version}.tar.bz2 +Patch1: bc-1.06-dc_ibase.patch +Patch2: bc-1.06.95-memleak.patch Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -27,11 +24,8 @@ if you would like to use its text mode calculator. %prep %setup -q -%patch1 -p1 -b .rl22 -%patch2 -p1 -b .s390 -%patch3 -p1 -b .info_exp_bessel -%patch5 -p1 -b .string -%patch6 -p1 -b .dc_ibase +%patch1 -p1 -b .dc_ibase +%patch2 -p1 -b .memleak %build %configure --with-readline @@ -71,6 +65,12 @@ fi %{_infodir}/* %changelog +* Thu Sep 24 2009 Ondrej Vasik 1.06-95-1 +- update to upstream alpha 1.06.95 (in use in Gentoo, Slackware + for quite a long time, marked stable there) +- removed already applied patches, fix small memory leak + (gentoo patch) + * Thu Aug 20 2009 Zdenek Prikryl 1.06-36 - Don't complain if installing with --excludedocs (#515934) diff --git a/sources b/sources index 259ca3e..686ab4f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d44b5dddebd8a7a7309aea6c36fda117 bc-1.06.tar.gz +5126a721b73f97d715bb72c13c889035 bc-1.06.95.tar.bz2