foo
[dosdemo] / src / treestor.c
index bad0ea7..91adfec 100644 (file)
@@ -4,7 +4,7 @@
 #include <errno.h>
 #include "treestor.h"
 
-#ifdef WIN32
+#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
 #include <malloc.h>
 #else
 #include <alloca.h>
@@ -105,7 +105,7 @@ fail:
        { \
                static char scrap[128]; \
                char *str; \
-               int sz = snprintf(scrap, sizeof scrap, fmt, x); \
+               int sz = sprintf(scrap, fmt, x); \
                if(!(str = malloc(sz + 1))) return 0; \
                sprintf(str, fmt, x); \
                return str; \