fixed aix portability problems

This commit is contained in:
TLINDEN
2013-11-17 16:53:20 +01:00
parent 91cc164f8d
commit 9a3431654e
20 changed files with 496 additions and 24 deletions

View File

@@ -21,6 +21,7 @@
#include "defines.h"
#include "platform.h"
#include <errno.h>
#include <stdarg.h>

View File

@@ -25,11 +25,14 @@
void *ucmalloc(size_t s) {
if (s == 0)
return NULL;
size_t size = s * sizeof(unsigned char);
void *value = malloc (size);
if (value == NULL) {
err(errno, "Cannot allocate memory");
err(errno, "Cannot allocate %d bytes of memory", (int)s);
exit(-1);
}