From 7c40ce6a98bf3d9c2881e7fddbbee7de5811a3a9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 6 Jan 2003 21:52:37 +0000 Subject: [PATCH] Only use strerror_r in threaded mode --- util/nmem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/nmem.c b/util/nmem.c index 8415772..e2f8cc4 100644 --- a/util/nmem.c +++ b/util/nmem.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: nmem.c,v 1.39 2003-01-06 08:20:28 adam Exp $ + * $Id: nmem.c,v 1.40 2003-01-06 21:52:37 adam Exp $ */ /* @@ -460,11 +460,17 @@ void yaz_strerror(char *buf, int max) else *buf = '\0'; #else +/* UNIX */ #if HAVE_STRERROR_R +#if YAZ_POSIX_THREADS strerror_r(errno, buf, max); #else strcpy(buf, strerror(yaz_errno())); #endif +#else + strcpy(buf, strerror(yaz_errno())); +#endif +/* UNIX */ #endif if ((cp=strrchr(buf, '\n'))) *cp = '\0'; -- 1.7.10.4