summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@fh-muenster.de>2016-05-03 20:15:47 (GMT)
committerMichael Tuexen <tuexen@fh-muenster.de>2016-05-03 20:15:47 (GMT)
commit60d8251b19d2cc08757cd04483f9f7fc8fff4830 (patch)
treef4b3f1216f580070677accddd841ea999d74b42c /programs
parent5b001767cd6db5afe1237a6ccd596ee46fb5d82f (diff)
downloadusrsctp-60d8251b19d2cc08757cd04483f9f7fc8fff4830.tar.gz
usrsctp-60d8251b19d2cc08757cd04483f9f7fc8fff4830.tar.xz
Improve Windows support.
Diffstat (limited to 'programs')
-rw-r--r--programs/http_client.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/programs/http_client.c b/programs/http_client.c
index c5c2c55..a2289ca 100644
--- a/programs/http_client.c
+++ b/programs/http_client.c
@@ -32,6 +32,9 @@
* Usage: http_client remote_addr remote_port [local_port] [local_encaps_port] [remote_encaps_port] [uri]
*/
+#ifdef _WIN32
+#define _CRT_SECURE_NO_WARNINGS
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -145,9 +148,17 @@ main(int argc, char *argv[])
}
if (argc > 6) {
+#ifdef _WIN32
+ _snprintf(request, sizeof(request), "%s %s %s", request_prefix, argv[6], request_postfix);
+#else
snprintf(request, sizeof(request), "%s %s %s", request_prefix, argv[6], request_postfix);
+#endif
} else {
+#ifdef _WIN32
+ _snprintf(request, sizeof(request), "%s %s %s", request_prefix, "/", request_postfix);
+#else
snprintf(request, sizeof(request), "%s %s %s", request_prefix, "/", request_postfix);
+#endif
}
printf("\nHTTP request:\n%s\n", request);