Merge branch 'next' of git.gitorious.org:fg/simgear into next

This commit is contained in:
Martin Spott
2011-09-08 11:48:56 +02:00
4 changed files with 14 additions and 11 deletions
+4 -1
View File
@@ -157,11 +157,14 @@ if(WIN32)
# SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
# endforeach(warning)
set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS")
set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996")
endif(MSVC)
# assumed on Windows
set(HAVE_GETLOCALTIME 1)
set( WINSOCK_LIBRARY "ws2_32.lib" )
set( RT_LIBRARY "winmm" )
endif(WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS}")
+3
View File
@@ -39,12 +39,14 @@ simgear_component(io io "${SOURCES}" "${HEADERS}")
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)
@@ -53,4 +55,5 @@ add_executable(httpget httpget.cxx)
target_link_libraries(httpget
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
${CMAKE_THREAD_LIBS_INIT}
${WINSOCK_LIBRARY}
${RT_LIBRARY})
+5 -3
View File
@@ -1,11 +1,11 @@
#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>
@@ -133,10 +133,12 @@ int main(int argc, char* argv[])
cl.setProxy(proxyHost, proxyPort, proxyAuth);
}
#ifndef WIN32
signal(SIGPIPE, SIG_IGN);
#endif
if (!outFile) {
outFile = new SGFile(STDOUT_FILENO);
outFile = new SGFile(fileno(stdout));
}
if (url.empty()) {
+2 -7
View File
@@ -5,10 +5,5 @@ set(HEADERS
SGQueue.hxx
SGThread.hxx)
if (MSVC)
install (FILES ${HEADERS} DESTINATION include/simgear/threads)
else (MSVC)
set(SOURCES SGThread.cxx)
simgear_component(threads threads "${SOURCES}" "${HEADERS}")
endif(MSVC)
set(SOURCES SGThread.cxx)
simgear_component(threads threads "${SOURCES}" "${HEADERS}")