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

« back to all changes in this revision

Viewing changes to lib/calloc.c

  • Committer: Steve Langasek
  • Date: 2012-06-29 02:07:40 UTC
  • mfrom: (4.1.9 sid)
  • Revision ID: steve.langasek@canonical.com-20120629020740-qqikrblzana08v2y
Merge version 1.5-1.1 from Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* calloc() function that is glibc compatible.
2
2
   This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
3
 
   Copyright (C) 2004-2007, 2009-2010 Free Software Foundation, Inc.
 
3
   Copyright (C) 2004-2007, 2009-2012 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
20
20
#include <config.h>
21
21
/* Only the AC_FUNC_CALLOC macro defines 'calloc' already in config.h.  */
22
22
#ifdef calloc
23
 
# define NEED_CALLOC_GNU
 
23
# define NEED_CALLOC_GNU 1
24
24
# undef calloc
 
25
/* Whereas the gnulib module 'calloc-gnu' defines HAVE_CALLOC_GNU.  */
 
26
#elif GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU
 
27
# define NEED_CALLOC_GNU 1
25
28
#endif
26
29
 
27
30
/* Specification.  */
40
43
{
41
44
  void *result;
42
45
 
43
 
#ifdef NEED_CALLOC_GNU
 
46
#if NEED_CALLOC_GNU
44
47
  if (n == 0 || s == 0)
45
48
    {
46
49
      n = 1;