summaryrefslogtreecommitdiff
path: root/wrapper/rvs.h
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper/rvs.h')
-rw-r--r--wrapper/rvs.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/wrapper/rvs.h b/wrapper/rvs.h
index adef3b1..8268613 100644
--- a/wrapper/rvs.h
+++ b/wrapper/rvs.h
@@ -17,8 +17,8 @@
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef FILE_rvs.h_SEEN
-#define FILE_rvs.h_SEEN
+#ifndef FILE_rvs_h_SEEN
+#define FILE_rvs_h_SEEN
#include <stdio.h>
#include <dirent.h>
@@ -28,11 +28,15 @@
#include <errno.h>
#include <error.h>
+extern char *program_invocation_name;
+
void *xmalloc (size_t size)
{
void *value = malloc (size);
if (value == NULL)
- error(EXIT_FAILURE,0,"virtual memory exhausted");
+ perror(program_invocation_name);
+ exit(EXIT_FAILURE);
+ /*error(EXIT_FAILURE,0,"virtual memory exhausted");*/
return value;
}
@@ -40,7 +44,9 @@ void *xrealloc (void *ptr, size_t size)
{
void *value = realloc (ptr, size);
if (value == NULL)
- error(EXIT_FAILURE,0,"virtual memory exhausted");
+ perror(program_invocation_name);
+ exit(EXIT_FAILURE);
+ /*error(EXIT_FAILURE,0,"virtual memory exhausted");*/
return value;
}