aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/bc.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/bc.xml')
-rw-r--r--chapter06/bc.xml17
1 files changed, 14 insertions, 3 deletions
diff --git a/chapter06/bc.xml b/chapter06/bc.xml
index 31794bb80..3c585547e 100644
--- a/chapter06/bc.xml
+++ b/chapter06/bc.xml
@@ -41,9 +41,20 @@
<sect2 role="installation">
<title>Installation of Bc</title>
- <para>First, fix some minor memory leaks in the code:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&bc-memory-leak-patch;</userinput></screen>
+ <para>First, change an internal script to use <command>sed</command> instead
+ of <command>ed</command>:</para>
+
+<screen><userinput remap="pre">cat &gt; bc/fix-libmath_h &lt;&lt; "EOF"
+#! /bin/bash
+sed -e '1 s/^/{"/' \
+ -e 's/$/",/' \
+ -e '2,$ s/^/"/' \
+ -e '$ d' \
+ -i libmath.h
+
+sed -e '$ s/$/0}/' \
+ -i libmath.h
+EOF</userinput></screen>
<para>Create a temporary symbolic link so the package can find
the readline library and confirm that its required libncurses