aboutsummaryrefslogtreecommitdiff
path: root/mmalloc
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-02-18 01:39:02 +0000
committerAndrew Cagney <cagney@redhat.com>2000-02-18 01:39:02 +0000
commit9365c12ca38698e3b3c5653080714f526204982e (patch)
treeb508443d5a40a82ee5bb90f12d4fb6b996990d6d /mmalloc
parentced7a2cc9a1c664fa6ff530b5598243843178390 (diff)
downloadfsf-binutils-gdb-9365c12ca38698e3b3c5653080714f526204982e.zip
fsf-binutils-gdb-9365c12ca38698e3b3c5653080714f526204982e.tar.gz
fsf-binutils-gdb-9365c12ca38698e3b3c5653080714f526204982e.tar.bz2
From 2000-02-17 RodneyBrown@pmsc.com:
mm.c, attach.c, mmap-sup.c, sbrk-sup.c: Include <unistd.h> for sbrk and lseek declarations.
Diffstat (limited to 'mmalloc')
-rw-r--r--mmalloc/ChangeLog9
-rw-r--r--mmalloc/attach.c5
-rwxr-xr-xmmalloc/configure99
-rw-r--r--mmalloc/configure.in21
-rw-r--r--mmalloc/mm.c5
-rw-r--r--mmalloc/mmap-sup.c5
-rw-r--r--mmalloc/sbrk-sup.c5
7 files changed, 100 insertions, 49 deletions
diff --git a/mmalloc/ChangeLog b/mmalloc/ChangeLog
index 89b54b3..cf6644a 100644
--- a/mmalloc/ChangeLog
+++ b/mmalloc/ChangeLog
@@ -1,3 +1,12 @@
+Fri Feb 18 11:42:21 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in: Check for <unistd.h>.
+ * configure: Regenerate.
+
+ From 2000-02-17 RodneyBrown@pmsc.com:
+ * mm.c, attach.c, mmap-sup.c, sbrk-sup.c: Include <unistd.h> for
+ sbrk and lseek declarations. Update copyright.
+
2000-02-04 Kevin Buettner (kevinb@cygnus.com)
* acinclude.m4, aclocal.m4: New files.
diff --git a/mmalloc/attach.c b/mmalloc/attach.c
index 70cfa6e..2bd70bf 100644
--- a/mmalloc/attach.c
+++ b/mmalloc/attach.c
@@ -1,5 +1,5 @@
/* Initialization for access to a mmap'd malloc managed region.
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 2000 Free Software Foundation, Inc.
Contributed by Fred Fish at Cygnus Support. fnf@cygnus.com
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA. */
#include <fcntl.h> /* After sys/types.h, at least for dpx/2. */
#include <sys/stat.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* Prototypes for lseek */
+#endif
#include "mmprivate.h"
#ifndef SEEK_SET
diff --git a/mmalloc/configure b/mmalloc/configure
index d1b943e..a07f02a 100755
--- a/mmalloc/configure
+++ b/mmalloc/configure
@@ -28,6 +28,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -142,6 +143,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -312,6 +314,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -477,12 +484,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -525,7 +536,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:529: checking for $ac_word" >&5
+echo "configure:540: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -555,7 +566,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:559: checking for $ac_word" >&5
+echo "configure:570: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -606,7 +617,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:610: checking for $ac_word" >&5
+echo "configure:621: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -638,7 +649,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:653: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -649,12 +660,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 653 "configure"
+#line 664 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -680,12 +691,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:689: checking whether we are using GNU C" >&5
+echo "configure:700: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -694,7 +705,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -713,7 +724,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:717: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:728: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -775,7 +786,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:779: checking for a BSD compatible install" >&5
+echo "configure:790: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -834,7 +845,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:838: checking host system type" >&5
+echo "configure:849: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -855,7 +866,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:859: checking build system type" >&5
+echo "configure:870: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -881,7 +892,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:885: checking for $ac_word" >&5
+echo "configure:896: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -913,7 +924,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:917: checking for $ac_word" >&5
+echo "configure:928: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -945,7 +956,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:949: checking for $ac_word" >&5
+echo "configure:960: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -979,7 +990,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:983: checking how to run the C preprocessor" >&5
+echo "configure:994: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -994,13 +1005,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 998 "configure"
+#line 1009 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1011,13 +1022,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1015 "configure"
+#line 1026 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1028,13 +1039,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1032 "configure"
+#line 1043 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1062,17 +1073,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1066: checking for $ac_hdr" >&5
+echo "configure:1077: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1071 "configure"
+#line 1082 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1101,12 +1112,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1105: checking for $ac_func" >&5
+echo "configure:1116: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1110 "configure"
+#line 1121 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1129,7 +1140,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1154,7 +1165,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1158: checking for working mmap" >&5
+echo "configure:1169: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1162,7 +1173,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
+#line 1177 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1302,7 +1313,7 @@ main()
}
EOF
-if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -1324,21 +1335,21 @@ EOF
fi
-for ac_hdr in limits.h stddef.h
+for ac_hdr in limits.h stddef.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1332: checking for $ac_hdr" >&5
+echo "configure:1343: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1337 "configure"
+#line 1348 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1366,12 +1377,12 @@ done
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:1370: checking whether sbrk must be declared" >&5
+echo "configure:1381: checking whether sbrk must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1375 "configure"
+#line 1386 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -1392,7 +1403,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
diff --git a/mmalloc/configure.in b/mmalloc/configure.in
index 03b1fa5..d0a5277 100644
--- a/mmalloc/configure.in
+++ b/mmalloc/configure.in
@@ -1,4 +1,23 @@
+dnl Autoconf configure script for MMALLOC, the GNU mmemory allocator.
+dnl Copyright 2000 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl Process this file with autoconf to produce a configure script.
+
AC_PREREQ(2.12.1)dnl
AC_INIT(mmalloc.c)
@@ -8,7 +27,7 @@ AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_FUNC_MMAP
-AC_CHECK_HEADERS(limits.h stddef.h)
+AC_CHECK_HEADERS(limits.h stddef.h unistd.h)
BFD_NEED_DECLARATION(sbrk)
diff --git a/mmalloc/mm.c b/mmalloc/mm.c
index b555f09..d487e0c 100644
--- a/mmalloc/mm.c
+++ b/mmalloc/mm.c
@@ -4,7 +4,7 @@
behavior. It should also still be possible to build the library
as a standard library with multiple objects.
- Copyright 1996 Free Software Foundation
+ Copyright 1996, 2000 Free Software Foundation
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -21,6 +21,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* Prototypes for lseek, sbrk (maybe) */
+#endif
#include "mcalloc.c"
#include "mfree.c"
#include "mmalloc.c"
diff --git a/mmalloc/mmap-sup.c b/mmalloc/mmap-sup.c
index f278789..d9a61fb 100644
--- a/mmalloc/mmap-sup.c
+++ b/mmalloc/mmap-sup.c
@@ -1,5 +1,5 @@
/* Support for an sbrk-like function that uses mmap.
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 2000 Free Software Foundation, Inc.
Contributed by Fred Fish at Cygnus Support. fnf@cygnus.com
@@ -22,6 +22,9 @@ Boston, MA 02111-1307, USA. */
#if defined(HAVE_MMAP)
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* Prototypes for lseek */
+#endif
#include <stdio.h>
#include <fcntl.h>
#include <sys/mman.h>
diff --git a/mmalloc/sbrk-sup.c b/mmalloc/sbrk-sup.c
index da0f7a2..93c078b 100644
--- a/mmalloc/sbrk-sup.c
+++ b/mmalloc/sbrk-sup.c
@@ -1,5 +1,5 @@
/* Support for sbrk() regions.
- Copyright 1992 Free Software Foundation, Inc.
+ Copyright 1992, 2000 Free Software Foundation, Inc.
Contributed by Fred Fish at Cygnus Support. fnf@cygnus.com
This file is part of the GNU C Library.
@@ -19,6 +19,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> /* Prototypes for sbrk (maybe) */
+#endif
#include <string.h> /* Prototypes for memcpy, memmove, memset, etc */
#include "mmprivate.h"