Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>.
  • Loading branch information
Eli-Zaretskii committed Oct 18, 2013
1 parent 70df3c3 commit 87e5b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NMakefile.template
Expand Up @@ -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 \
Expand All @@ -105,6 +106,7 @@ OBJS = \
$(OUTDIR)/fnmatch.obj \
$(OUTDIR)/dirent.obj \
$(OUTDIR)/pathstuff.obj \
$(OUTDIR)/posixfcn.obj \
$(guile)

$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
Expand All @@ -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 $?
2 changes: 1 addition & 1 deletion output.c
Expand Up @@ -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)
{
Expand Down

0 comments on commit 87e5b64

Please sign in to comment.