projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backported build fixes and warnings cleanup from dos
[dosdemo]
/
src
/
treestor.c
diff --git
a/src/treestor.c
b/src/treestor.c
index
bad0ea7
..
91adfec
100644
(file)
--- a/
src/treestor.c
+++ b/
src/treestor.c
@@
-4,7
+4,7
@@
#include <errno.h>
#include "treestor.h"
#include <errno.h>
#include "treestor.h"
-#ifdef WIN32
+#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
#include <malloc.h>
#else
#include <alloca.h>
#include <malloc.h>
#else
#include <alloca.h>
@@
-105,7
+105,7
@@
fail:
{ \
static char scrap[128]; \
char *str; \
{ \
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; \
if(!(str = malloc(sz + 1))) return 0; \
sprintf(str, fmt, x); \
return str; \