This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 000215 some warning removal


Rodney Brown wrote:

FYI, I applied the attatched to the malloc directory.  FWIW, in cases
like this, it is best to separate out the changes for each directory and
submit them separatly.  Otherwize the maintainer gets to do it.

>         * mmalloc/mm.c unistd.h for sbrk, lseek declaration
>         * mmalloc/attach.c unistd.h for lseek declaration
>         * mmalloc/mmap-sup.c unistd.h for lseek declaration
>         * mmalloc/sbrk-sup.c unistd.h for sbrk declaration

Thanks!
	Andrew
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.

Index: attach.c
===================================================================
RCS file: /cvs/src/src/mmalloc/attach.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 attach.c
*** attach.c	1999/04/16 01:34:49	1.1.1.1
--- attach.c	2000/02/18 01:24:42
***************
*** 1,5 ****
  /* Initialization for access to a mmap'd malloc managed region.
!    Copyright 1992 Free Software Foundation, Inc.
  
     Contributed by Fred Fish at Cygnus Support.   fnf@cygnus.com
  
--- 1,5 ----
  /* Initialization for access to a mmap'd malloc managed region.
!    Copyright 1992, 2000 Free Software Foundation, Inc.
  
     Contributed by Fred Fish at Cygnus Support.   fnf@cygnus.com
  
*************** Boston, MA 02111-1307, USA.  */
*** 24,29 ****
--- 24,32 ----
  #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
Index: configure.in
===================================================================
RCS file: /cvs/src/src/mmalloc/configure.in,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 configure.in
*** configure.in	2000/02/05 07:30:16	1.1.1.2
--- configure.in	2000/02/18 01:24:42
***************
*** 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)
  
*************** AC_CHECK_TOOL(AR, ar)
*** 8,14 ****
  AC_CHECK_TOOL(RANLIB, ranlib, :)
  
  AC_FUNC_MMAP
! AC_CHECK_HEADERS(limits.h stddef.h)
  
  BFD_NEED_DECLARATION(sbrk)
  
--- 27,33 ----
  AC_CHECK_TOOL(RANLIB, ranlib, :)
  
  AC_FUNC_MMAP
! AC_CHECK_HEADERS(limits.h stddef.h unistd.h)
  
  BFD_NEED_DECLARATION(sbrk)
  
Index: mm.c
===================================================================
RCS file: /cvs/src/src/mmalloc/mm.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 mm.c
*** mm.c	1999/04/16 01:34:49	1.1.1.1
--- mm.c	2000/02/18 01:24:42
***************
*** 4,10 ****
     behavior.  It should also still be possible to build the library
     as a standard library with multiple objects.
  
!    Copyright 1996 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
--- 4,10 ----
     behavior.  It should also still be possible to build the library
     as a standard library with multiple objects.
  
!    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
*************** License along with the GNU C Library; se
*** 21,26 ****
--- 21,29 ----
  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"
Index: mmap-sup.c
===================================================================
RCS file: /cvs/src/src/mmalloc/mmap-sup.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 mmap-sup.c
*** mmap-sup.c	1999/04/16 01:34:49	1.1.1.1
--- mmap-sup.c	2000/02/18 01:24:42
***************
*** 1,5 ****
  /* Support for an sbrk-like function that uses mmap.
!    Copyright 1992 Free Software Foundation, Inc.
  
     Contributed by Fred Fish at Cygnus Support.   fnf@cygnus.com
  
--- 1,5 ----
  /* Support for an sbrk-like function that uses mmap.
!    Copyright 1992, 2000 Free Software Foundation, Inc.
  
     Contributed by Fred Fish at Cygnus Support.   fnf@cygnus.com
  
*************** Boston, MA 02111-1307, USA.  */
*** 22,27 ****
--- 22,30 ----
  
  #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>
Index: sbrk-sup.c
===================================================================
RCS file: /cvs/src/src/mmalloc/sbrk-sup.c,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 sbrk-sup.c
*** sbrk-sup.c	2000/02/05 07:30:16	1.1.1.2
--- sbrk-sup.c	2000/02/18 01:24:42
***************
*** 1,5 ****
  /* Support for sbrk() regions.
!    Copyright 1992 Free Software Foundation, Inc.
     Contributed by Fred Fish at Cygnus Support.   fnf@cygnus.com
  
  This file is part of the GNU C Library.
--- 1,5 ----
  /* Support for sbrk() regions.
!    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.
*************** License along with the GNU C Library; se
*** 19,24 ****
--- 19,27 ----
  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"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]