Index: bc/Makefile.in
--- bc/Makefile.in.orig	2000-11-15 21:19:14 +0100
+++ bc/Makefile.in	2008-08-29 16:09:30 +0200
@@ -85,7 +85,7 @@
 
 YFLAGS = -d
 
-CFLAGS = @CFLAGS@ -Wall -funsigned-char
+CFLAGS = @CFLAGS@ -funsigned-char
 
 fbcOBJ = main.o bc.o scan.o execute.o global.o load.o storage.o util.o
 
Index: bc/scan.l
--- bc/scan.l.orig	2000-09-13 20:25:47 +0200
+++ bc/scan.l	2008-08-29 16:09:30 +0200
@@ -142,8 +142,6 @@
 static int   rl_len = 0;
 
 /* 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
Index: configure
--- configure.orig	2000-10-03 20:34:24 +0200
+++ configure	2008-08-29 16:09:30 +0200
@@ -1985,8 +1985,8 @@
   echo "$ac_t""no" 1>&6
 fi
 
-   LDSAVE=$LDFLAGS
-   LDFLAGS="$LDFLAGS $TERMLIB"
+   LIBS_SAVE=$LIBS
+   LIBS="$LIBS $TERMLIB"
    echo $ac_n "checking for el_gets in -ledit""... $ac_c" 1>&6
 echo "configure:1992: checking for el_gets in -ledit" >&5
 ac_lib_var=`echo edit'_'el_gets | sed 'y%./+-%__p_%'`
@@ -2067,7 +2067,7 @@
 EOF
 
    fi
-   LDFLAGS=$LDSAVE
+   LIBS=$LIBS_SAVE
 
 fi
 
@@ -2157,8 +2157,8 @@
 
 fi
 
-   LDSAVE=$LDFLAGS
-   LDFLAGS="$LDFLAGS $TERMLIB"
+   LIBS_SAVE=$LIBS
+   LIBS="$LIBS $TERMLIB"
    echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
 echo "configure:2164: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
@@ -2239,7 +2239,7 @@
 EOF
 
    fi
-   LDFLAGS=$LDSAVE
+   LIBS=$LIBS_SAVE
 
 fi
 
Index: dc/Makefile.in
--- dc/Makefile.in.orig	2000-11-15 21:19:16 +0100
+++ dc/Makefile.in	2008-08-29 16:09:30 +0200
@@ -76,7 +76,7 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-CFLAGS = @CFLAGS@ -Wall -funsigned-char
+CFLAGS = @CFLAGS@ -funsigned-char
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 
Index: lib/Makefile.in
--- lib/Makefile.in.orig	2000-11-15 21:19:13 +0100
+++ lib/Makefile.in	2008-08-29 16:09:30 +0200
@@ -74,7 +74,7 @@
 
 DEFS = @DEFS@ $(DEFSADD)
 
-CFLAGS = @CFLAGS@ -Wall -funsigned-char
+CFLAGS = @CFLAGS@ -funsigned-char
 
 MAINTAINERCLEANFILES = Makefile.in number.c
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
Index: lib/getopt.c
--- lib/getopt.c.orig	2000-07-08 01:34:09 +0200
+++ lib/getopt.c	2008-08-29 16:09:30 +0200
@@ -43,6 +43,7 @@
 #endif
 
 #include <stdio.h>
+#include <string.h>
 
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself.  This code is part of the GNU C
Index: lib/number.c
--- lib/number.c.orig	2000-10-03 20:34:25 +0200
+++ lib/number.c	2008-08-29 16:09:56 +0200
@@ -34,6 +34,8 @@
 #include <number.h>
 #include <assert.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <ctype.h>/* Prototypes needed for external utility routines. */
 
 #define bc_rt_warn rt_warn
