~ubuntu-branches/ubuntu/vivid/gzip/vivid

« back to all changes in this revision

Viewing changes to lib/xmalloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-10-19 11:42:42 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20111019114242-d8wiiu8kbvdtgmgj
Tags: 1.4-1ubuntu1
* Merge with Debian testing.  Remaining Ubuntu changes:
  - debian/{control,rules}: Remove the Win32 build and mingw64
    build-dependency, since mingw is in universe, and will remain so for
    the forseeable future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* xmalloc.c -- malloc with out of memory checking
2
2
 
3
 
   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4
 
   1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
 
   Inc.
 
3
   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 
4
   2000, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free Software
 
5
   Foundation, Inc.
6
6
 
7
 
   This program is free software; you can redistribute it and/or modify
 
7
   This program is free software: you can redistribute it and/or modify
8
8
   it under the terms of the GNU General Public License as published by
9
 
   the Free Software Foundation; either version 2, or (at your option)
10
 
   any later version.
 
9
   the Free Software Foundation; either version 3 of the License, or
 
10
   (at your option) any later version.
11
11
 
12
12
   This program is distributed in the hope that it will be useful,
13
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
   GNU General Public License for more details.
16
16
 
17
17
   You should have received a copy of the GNU General Public License
18
 
   along with this program; if not, write to the Free Software Foundation,
19
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
18
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
19
 
21
20
#include <config.h>
22
21
 
29
28
#include <stdlib.h>
30
29
#include <string.h>
31
30
 
32
 
#ifndef SIZE_MAX
33
 
# define SIZE_MAX ((size_t) -1)
34
 
#endif
35
 
 
36
31
/* 1 if calloc is known to be compatible with GNU calloc.  This
37
32
   matters if we are not also using the calloc module, which defines
38
33
   HAVE_CALLOC and supports the GNU API even on non-GNU platforms.  */