summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-10-18 13:08:12 +0300
committerEli Zaretskii <eliz@gnu.org>2013-10-18 13:08:12 +0300
commit87e5b64f419c4873e8340dc71d5553949157601c (patch)
treeaed96a751a6f9a8b88a9df0760f8ebfac3b37eee
parent70df3c35bf2f0272f5346a57410a31d9d7d0735c (diff)
downloadgunmake-87e5b64f419c4873e8340dc71d5553949157601c.tar.gz
Fix the MSVC build on MS-Windows.
output.c (vsnprintf) [_MSC_VER]: Define, instead of defining snprintf, which isn't used. Reported by Christian Boos <cboos@edgewall.org>. NMakefile.template (OBJS): Add load.obj and posixfcn.obj. ($(OUTDIR)/pathstuff.obj): New dependency. Suggested by Christian Boos <cboos@edgewall.org>.
-rw-r--r--NMakefile.template4
-rw-r--r--output.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/NMakefile.template b/NMakefile.template
index 1b6f6bd..8a787a1 100644
--- a/NMakefile.template
+++ b/NMakefile.template
@@ -89,6 +89,7 @@ OBJS = \
$(OUTDIR)/hash.obj \
$(OUTDIR)/implicit.obj \
$(OUTDIR)/job.obj \
+ $(OUTDIR)/load.obj \
$(OUTDIR)/main.obj \
$(OUTDIR)/misc.obj \
$(OUTDIR)/output.obj \
@@ -105,6 +106,7 @@ OBJS = \
$(OUTDIR)/fnmatch.obj \
$(OUTDIR)/dirent.obj \
$(OUTDIR)/pathstuff.obj \
+ $(OUTDIR)/posixfcn.obj \
$(guile)
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
@@ -121,5 +123,7 @@ $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
$(CC) $(CFLAGS) /c $?
+$(OUTDIR)/pathstuff.obj : w32/compat/posixfcn.c
+ $(CC) $(CFLAGS) /c $?
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
$(CC) $(CFLAGS) /c $?
diff --git a/output.c b/output.c
index fa757b0..5e3b073 100644
--- a/output.c
+++ b/output.c
@@ -61,7 +61,7 @@ unsigned int stdio_traced = 0;
#endif
#ifdef _MSC_VER
# define va_copy(_d, _s) ((_d) = (_s))
-# define snprintf msc_vsnprintf
+# define vsnprintf msc_vsnprintf
static int
msc_vsnprintf (char *str, size_t size, const char *format, va_list ap)
{