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)
This commit is contained in:
Родитель
007659a107
Коммит
322316608b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче