From 87e5b64f419c4873e8340dc71d5553949157601c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 18 Oct 2013 13:08:12 +0300 Subject: 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 . NMakefile.template (OBJS): Add load.obj and posixfcn.obj. ($(OUTDIR)/pathstuff.obj): New dependency. Suggested by Christian Boos . --- NMakefile.template | 4 ++++ output.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3