Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cygwin build (disable NetworkInterface)

#idef'd out all references to NetworkInterface to be able to compile on
platforms where it is not supported (e.g. Cygwin, vxWorks)
  • Loading branch information...
commit 322316608bb7e0345677a173d91874fbeb29e766 1 parent 007659a
Aleksandar Fabijanic aleks-f authored
24 Net/samples/ifconfig/src/ifconfig.cpp
View
@@ -4,7 +4,7 @@
// $Id: //poco/1.4/Net/samples/download/src/ifconfig.cpp#1 $
//
// This sample demonstrates the (display only) ifconfig-like capabilities
-// of the NetworkInterface class.
+// of the NetworkInterface class (on platforms where it is supported).
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
@@ -33,12 +33,17 @@
//
+#include "Poco/Net/NetworkInterface.h"
+#include <iostream>
+
+
+#ifdef POCO_NET_HAS_INTERFACE
+
+
#include "Poco/Path.h"
#include "Poco/Exception.h"
#include "Poco/Net/IPAddress.h"
-#include "Poco/Net/NetworkInterface.h"
#include <memory>
-#include <iostream>
using Poco::Path;
@@ -148,3 +153,16 @@ int main(int argc, char** argv)
return 0;
}
+
+
+#else // POCO_NET_HAS_INTERFACE
+
+
+int main(int argc, char** argv)
+{
+ std::cout << "NetworkInterface not supported on this platform." << std::endl;
+ return 0;
+}
+
+
+#endif // POCO_NET_HAS_INTERFACE
5 Net/testsuite/src/SocketsTestSuite.cpp
View
@@ -46,9 +46,10 @@ CppUnit::Test* SocketsTestSuite::suite()
pSuite->addTest(SocketTest::suite());
pSuite->addTest(SocketStreamTest::suite());
pSuite->addTest(DatagramSocketTest::suite());
- pSuite->addTest(MulticastSocketTest::suite());
pSuite->addTest(DialogSocketTest::suite());
pSuite->addTest(RawSocketTest::suite());
-
+#ifdef POCO_NET_HAS_INTERFACE
+ pSuite->addTest(MulticastSocketTest::suite());
+#endif
return pSuite;
}
Please sign in to comment.
Something went wrong with that request. Please try again.