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:
3599bbc
)
Using _vsnprintf on WIN32.
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 3 Jan 2002 10:23:33 +0000
(10:23 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 3 Jan 2002 10:23:33 +0000
(10:23 +0000)
util/log.c
patch
|
blob
|
history
diff --git
a/util/log.c
b/util/log.c
index
66d4cc2
..
6af4b09
100644
(file)
--- a/
util/log.c
+++ b/
util/log.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: log.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: log.c,v $
- * Revision 1.25 2001-08-23 09:02:46 adam
+ * Revision 1.26 2002-01-03 10:23:33 adam
+ * Using _vsnprintf on WIN32.
+ *
+ * Revision 1.25 2001/08/23 09:02:46 adam
* WIN32 fixes: Socket not re-used for bind. yaz_log logs WIN32 error
* message.
*
* WIN32 fixes: Socket not re-used for bind. yaz_log logs WIN32 error
* message.
*
@@
-243,11
+246,17
@@
void yaz_log(int level, const char *fmt, ...)
level -= mask_names[i].mask;
}
va_start(ap, fmt);
level -= mask_names[i].mask;
}
va_start(ap, fmt);
+#ifdef WIN32
+ _vsnprintf(buf, sizeof(buf)-1, fmt, ap);
+#else
+/* !WIN32 */
#if HAVE_VSNPRINTF
vsnprintf(buf, sizeof(buf), fmt, ap);
#else
vsprintf(buf, fmt, ap);
#endif
#if HAVE_VSNPRINTF
vsnprintf(buf, sizeof(buf), fmt, ap);
#else
vsprintf(buf, fmt, ap);
#endif
+#endif
+/* WIN32 */
if (o_level & LOG_ERRNO)
{
#ifdef WIN32
if (o_level & LOG_ERRNO)
{
#ifdef WIN32