X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fsocktest.cxx;h=83adfd2742cc22be9a5fbd2628d62b051c298323;hb=6a7c2000027cd22eea603e936ddbad1a5bfc8b04;hp=38c38a6e98272621319b8605b1563bbd0e018631;hpb=30a14741c9d433abbb3986200e235db2edb93f36;p=simgear.git diff --git a/simgear/io/socktest.cxx b/simgear/io/socktest.cxx index 38c38a6e..83adfd27 100644 --- a/simgear/io/socktest.cxx +++ b/simgear/io/socktest.cxx @@ -1,20 +1,23 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include -#include STL_IOSTREAM +#include #include "sg_socket.hxx" #include "lowlevel.hxx" -#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) -SG_USING_STD(cout); -SG_USING_STD(endl); -#endif - static const int sgEndianTest = 1; #define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0) #define sgIsBigEndian (*((char *) &sgEndianTest ) == 0) +using std::cout; +using std::endl; + + int main() { if ( sgIsLittleEndian ) { @@ -41,6 +44,10 @@ int main() { if ( s.readline( buf, 256 ) > 0 ) { cout << "result = " << buf; } +#ifdef __MINGW32__ + Sleep(100); +#else sleep(1); +#endif } }