add_executable(test_sock socktest.cxx)
target_link_libraries(test_sock sgio sgstructure sgthreads sgdebug
${CMAKE_THREAD_LIBS_INIT}
+ ${WINSOCK_LIBRARY}
${RT_LIBRARY})
add_executable(test_http test_HTTP.cxx)
target_link_libraries(test_http
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
${CMAKE_THREAD_LIBS_INIT}
+ ${WINSOCK_LIBRARY}
${RT_LIBRARY})
add_test(http ${EXECUTABLE_OUTPUT_PATH}/test_http)
target_link_libraries(httpget
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
${CMAKE_THREAD_LIBS_INIT}
+ ${WINSOCK_LIBRARY}
${RT_LIBRARY})
#include <cstdio>
#include <cstring>
+#include <signal.h>
-#include <unistd.h> // for STDOUT_FILENO
#include <iostream>
#include <boost/foreach.hpp>
-#include <signal.h>
+
#include <simgear/io/sg_file.hxx>
#include <simgear/io/HTTPClient.hxx>
signal(SIGPIPE, SIG_IGN);
if (!outFile) {
- outFile = new SGFile(STDOUT_FILENO);
+ outFile = new SGFile(fileno(stdout));
}
if (url.empty()) {