projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d531a1
)
Only use strerror_r in threaded mode
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 6 Jan 2003 21:52:37 +0000
(21:52 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 6 Jan 2003 21:52:37 +0000
(21:52 +0000)
util/nmem.c
patch
|
blob
|
history
diff --git
a/util/nmem.c
b/util/nmem.c
index
8415772
..
e2f8cc4
100644
(file)
--- a/
util/nmem.c
+++ b/
util/nmem.c
@@
-3,7
+3,7
@@
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* 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
else
*buf = '\0';
#else
+/* UNIX */
#if HAVE_STRERROR_R
#if HAVE_STRERROR_R
+#if YAZ_POSIX_THREADS
strerror_r(errno, buf, max);
#else
strcpy(buf, strerror(yaz_errno()));
#endif
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';
#endif
if ((cp=strrchr(buf, '\n')))
*cp = '\0';