{ XK_Zen_Koho, Qt::Key_MultipleCandidate },
{ XK_Mae_Koho, Qt::Key_PreviousCandidate },
-#ifdef XK_KOREAN
// Korean keyboard support
{ XK_Hangul, Qt::Key_Hangul },
{ XK_Hangul_Start, Qt::Key_Hangul_Start },
{ XK_Hangul_Special, Qt::Key_Hangul_Special },
// { XK_Hangul_switch, Qt::Key_Hangul_switch },
{ XK_Hangul_switch, Qt::Key_Mode_switch },
-#endif // XK_KOREAN
// dead keys
{ XK_dead_grave, Qt::Key_Dead_Grave },
#ifndef QT_NO_NETWORKINTERFACE
-#define IP_MULTICAST // make AIX happy and define IFF_MULTICAST
-
#include <sys/types.h>
#include <sys/socket.h>
flags |= (rawFlags & IFF_RUNNING) ? QNetworkInterface::IsRunning : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_BROADCAST) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_LOOPBACK) ? QNetworkInterface::IsLoopBack : QNetworkInterface::InterfaceFlag(0);
-#ifdef IFF_POINTOPOINT //cygwin doesn't define IFF_POINTOPOINT
flags |= (rawFlags & IFF_POINTOPOINT) ? QNetworkInterface::IsPointToPoint : QNetworkInterface::InterfaceFlag(0);
-#endif
-
-#ifdef IFF_MULTICAST
flags |= (rawFlags & IFF_MULTICAST) ? QNetworkInterface::CanMulticast : QNetworkInterface::InterfaceFlag(0);
-#endif
return flags;
}
iface->index = ifindex;
interfaces << iface;
-#ifdef SIOCGIFNAME
// Get the canonical name
QByteArray oldName = req.ifr_name;
if (qt_safe_ioctl(socket, SIOCGIFNAME, &req) >= 0) {
// reset the name:
memcpy(req.ifr_name, oldName, qMin<int>(oldName.length() + 1, sizeof(req.ifr_name) - 1));
} else
-#endif
{
// use this name anyways
iface->name = QString::fromLatin1(req.ifr_name);
iface->flags = convertFlags(req.ifr_flags);
}
-#ifdef SIOCGIFHWADDR
// Get the HW address
if (qt_safe_ioctl(socket, SIOCGIFHWADDR, &req) >= 0) {
uchar *addr = (uchar *)req.ifr_addr.sa_data;
iface->hardwareAddress = iface->makeHwAddress(6, addr);
}
-#endif
return iface;
}
{
QList<QNetworkInterfacePrivate *> interfaces;
- int socket;
- if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
+ int socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
+ if (socket == -1)
return interfaces; // error
QSet<QByteArray> names = interfaceNames(socket);
{
QList<QNetworkInterfacePrivate *> interfaces;
- int socket;
- if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
+ int socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
+ if (socket == -1)
return interfaces; // error
ifaddrs *interfaceListing;
- if (getifaddrs(&interfaceListing) == -1) {
+ if (::getifaddrs(&interfaceListing) == -1) {
// error
::close(socket);
return interfaces;