]> git.cworth.org Git - tar/blob - gnu/xalloc-die.c
upstream: Fix extraction of device nodes.
[tar] / gnu / xalloc-die.c
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Report a memory allocation failure and exit.
4
5    Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2009, 2010
6    Free Software Foundation, Inc.
7
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21 #include <config.h>
22
23 #include "xalloc.h"
24
25 #include <stdlib.h>
26
27 #include "error.h"
28 #include "exitfail.h"
29
30 #include "gettext.h"
31 #define _(msgid) gettext (msgid)
32
33 void
34 xalloc_die (void)
35 {
36   error (exit_failure, 0, "%s", _("memory exhausted"));
37
38   /* The `noreturn' cannot be given to error, since it may return if
39      its first argument is 0.  To help compilers understand the
40      xalloc_die does not return, call abort.  Also, the abort is a
41      safety feature if exit_failure is 0 (which shouldn't happen).  */
42   abort ();
43 }