on master help sign in
Use _snprintf from msvcrt in windows.c.
commit2f732a06d8edce94a698a058f8e6a2d8cc1fd9ed authorYitzchak Gale <gale@sefer.org> dateThu 29 Jan 2015, 12:42 (12 years ago) parent169ef6e
2 files changed+2−2
wai-handler-launch/wai-handler-launch.cabal+1−1 wai-handler-launch/windows.c+1−1
wai-handler-launch/wai-handler-launch.cabal+1−1
@@ -25,7 +25,7 @@ Library
2525 if os(windows)
2626 c-sources: windows.c
2727 cpp-options: -DWINDOWS
28− extra-libraries: Shell32
28+ extra-libraries: Shell32 msvcrt
2929 else
3030 build-depends: process >= 1.0 && < 1.3
3131 if os(darwin)
wai-handler-launch/windows.c+1−1
@@ -6,7 +6,7 @@ void launch(int port, char *s)
66{
77 int len = 8 + strlen("http://127.0.0.1:") + strlen(s);
88 char *buff = malloc(len);
9− snprintf(buff, len, "http://127.0.0.1:%d/%s", port, s);
9+ _snprintf(buff, len, "http://127.0.0.1:%d/%s", port, s);
1010 ShellExecute(NULL, "open", buff, NULL, NULL, SW_SHOWNORMAL);
1111 free(buff);
1212}