From 5acca4fa9c5841f48e8ef1b6ac7599dccde69b65 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Sep 2002 18:41:18 +0000 Subject: [PATCH] Added yaz_errno --- include/yaz/nmem.h | 6 +++++- util/nmem.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/yaz/nmem.h b/include/yaz/nmem.h index b042f6e..416199c 100644 --- a/include/yaz/nmem.h +++ b/include/yaz/nmem.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: nmem.h,v $ - * Revision 1.6 2001-06-26 14:11:27 adam + * Revision 1.7 2002-09-10 18:41:18 adam + * Added yaz_errno + * + * Revision 1.6 2001/06/26 14:11:27 adam * Added MUTEX functions for NMEM module (used by OID utility). * * Revision 1.5 2001/03/25 21:55:12 adam @@ -126,6 +129,7 @@ YAZ_EXPORT void *nmem_malloc(NMEM n, int size); YAZ_EXPORT void nmem_init (void); YAZ_EXPORT void nmem_exit (void); +YAZ_EXPORT int yaz_errno (void); YAZ_END_CDECL diff --git a/util/nmem.c b/util/nmem.c index 9545471..15fe281 100644 --- a/util/nmem.c +++ b/util/nmem.c @@ -1,9 +1,9 @@ /* - * 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.35 2002-06-12 19:42:38 adam Exp $ + * $Id: nmem.c,v 1.36 2002-09-10 18:41:18 adam Exp $ */ /* @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -429,3 +430,8 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, return TRUE; } #endif + +int yaz_errno(void) +{ + return errno; +} -- 1.7.10.4