Skip to content

Commit

Permalink
Merge pull request JuliaLang#9748 from JuliaLang/tk/fix9624
Browse files Browse the repository at this point in the history
Fix JuliaLang#9624, julia -h on Windows
  • Loading branch information
vtjnash committed Jan 13, 2015
2 parents e58e819 + 1bb4d6a commit 7f915c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/support/asprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
# endif
#endif

#ifndef _WIN32
#define INIT_SZ 128
#endif

#ifdef __cplusplus
extern "C" {
Expand All @@ -53,6 +55,11 @@ vasprintf(char **str, const char *fmt, va_list ap)
size_t len;

VA_COPY(ap2, ap);

#ifdef _WIN32
int INIT_SZ = _vscprintf(fmt, ap2);
#endif

if ((string = (char*)malloc(INIT_SZ)) == NULL)
goto fail;

Expand Down

0 comments on commit 7f915c7

Please sign in to comment.