/*
- * Copyright (c) 1995-2001, Index Data.
+ * Copyright (c) 1995-2002, Index Data.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: nmem.c,v 1.34 2001-11-18 21:05:13 adam Exp $
+ * $Id: nmem.c,v 1.36 2002-09-10 18:41:18 adam Exp $
*/
/*
#include <assert.h>
#include <string.h>
+#include <errno.h>
#include <yaz/xmalloc.h>
#include <yaz/nmem.h>
#include <yaz/log.h>
#endif
if (!n)
{
+ yaz_log (LOG_FATAL, "calling nmem_malloc with an null pointer");
abort ();
- return xmalloc(size);
}
#ifdef WIN32
assert (nmem_init_flag);
return TRUE;
}
#endif
+
+int yaz_errno(void)
+{
+ return errno;
+}