X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmalloc.c;h=d4dae3e182de32c4586304cc33c683f99c0b5f95;hb=a6f8cadf086f4abeda879dd491e5da7dddb01d59;hp=bcd6b564b07abf5d41a5d1faeca6ecb3aa6e29ae;hpb=92295bc4b2a378893386efd3cf8cf9bc31024b59;p=gnulib.git diff --git a/lib/malloc.c b/lib/malloc.c index bcd6b564b..d4dae3e18 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -1,5 +1,6 @@ -/* Work around bug on some systems where malloc (0) fails. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* malloc() function that is glibc compatible. + + Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,23 +14,19 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering */ -#if HAVE_CONFIG_H -# include -#endif +#include #undef malloc -#include - -char *malloc (); +#include /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ -char * +void * rpl_malloc (size_t n) { if (n == 0)