diff options
author | Robert Griebl <rgriebl@trolltech.com> | 2008-07-30 21:14:24 (GMT) |
---|---|---|
committer | Robert Griebl <rgriebl@trolltech.com> | 2009-07-29 08:50:20 (GMT) |
commit | d7b688870aead912690188b324d370b920a7a600 (patch) | |
tree | aac6c19d222ca3bad65cfbb850483a647013c67a /src/network/kernel | |
parent | e5262a0c29c743f2afd4ba249e8adff984c1ca83 (diff) | |
download | Qt-d7b688870aead912690188b324d370b920a7a600.zip Qt-d7b688870aead912690188b324d370b920a7a600.tar.gz Qt-d7b688870aead912690188b324d370b920a7a600.tar.bz2 |
Port of Qt to VxWorks
This makes Qt work on VxWorks 6.6+ in native (kernel) mode.
* compiles with the WindRiver GNU toolchain (Linux only)
* works with QWS (tested with the VNC driver only)
* tested on PPC hardware and the x86 VxWorks simulator
* no q3support, no phonon, no webkit
* no QSharedMemory, no QSystemSemaphore, no QProcess
* only one QApplication instance (flat address space)
* filesystem support depends heavily on the quality of the native driver
* QLibrary is just a dummy to make plugins work at all
* qmake transparently creates VxWorks munching rules for static ctors
* made auto-test cope with missing OS features
A special note regarding the Q_FOREACH patch for dcc:
when calling foreach(a,c) with c being a function returning a container,
the compiler would generate 5 references to some labels (.LXXXX), which
are not there (so the linker complains in the end).
Seems like dcc doesn't really like the 'true ? 0 : <function call to get type>'
statement
Reviewed-By: Harald Fernengel
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo_unix.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index fef488b..64e9e29 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -57,7 +57,11 @@ static const int RESOLVER_TIMEOUT = 2000; #include <sys/types.h> #include <netdb.h> #include <arpa/inet.h> -#include <resolv.h> +#if defined(Q_OS_VXWORKS) +# include <hostLib.h> +#else +# include <resolv.h> +#endif #if defined (QT_NO_GETADDRINFO) #include <qmutex.h> @@ -275,10 +279,12 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) results.setError(QHostInfo::UnknownError); results.setErrorString(tr("Unknown address type")); } +#if !defined(Q_OS_VXWORKS) } else if (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA || h_errno == NO_ADDRESS) { results.setError(QHostInfo::HostNotFound); results.setErrorString(tr("Host not found")); +#endif } else { results.setError(QHostInfo::UnknownError); results.setErrorString(tr("Unknown error")); @@ -315,6 +321,7 @@ QString QHostInfo::localHostName() QString QHostInfo::localDomainName() { +#if !defined(Q_OS_VXWORKS) resolveLibrary(); if (local_res_ninit) { // using thread-safe version @@ -344,7 +351,7 @@ QString QHostInfo::localDomainName() domainName = QUrl::fromAce(local_res->dnsrch[0]); return domainName; } - +#endif // nothing worked, try doing it by ourselves: QFile resolvconf; #if defined(_PATH_RESCONF) |