X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fsocktest.cxx;h=9a4f0cfe7450ad666f2debbda90ac45c88bbcb8a;hb=72bb9f4d5d6d861902a5779381e4ebe977db1df1;hp=2586b42cd51cbfd5f823bf21a40a2fe76d387131;hpb=78411d29a7fdd606e50a81d03d6e8a08dcb15828;p=simgear.git diff --git a/simgear/io/socktest.cxx b/simgear/io/socktest.cxx index 2586b42c..9a4f0cfe 100644 --- a/simgear/io/socktest.cxx +++ b/simgear/io/socktest.cxx @@ -1,7 +1,16 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include +#ifdef _WIN32 +#include +#define sleep(x) Sleep(x*1000) +#else #include -#include STL_IOSTREAM +#endif +#include #include "sg_socket.hxx" #include "lowlevel.hxx" @@ -10,8 +19,8 @@ static const int sgEndianTest = 1; #define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0) #define sgIsBigEndian (*((char *) &sgEndianTest ) == 0) -SG_USING_STD(cout); -SG_USING_STD(endl); +using std::cout; +using std::endl; int main() { @@ -40,10 +49,6 @@ int main() { if ( s.readline( buf, 256 ) > 0 ) { cout << "result = " << buf; } -#ifdef __MINGW32__ - Sleep(100); -#else sleep(1); -#endif } }