X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..6ba718d7aee2f519d9146b90424ccec9e2243479:/src/unix/dialup.cpp?ds=sidebyside diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index edf6657b30..95d37b22ef 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -4,7 +4,6 @@ // Author: Karsten Ballüder // Modified by: // Created: 03.10.99 -// RCS-ID: $Id$ // Copyright: (c) Karsten Ballüder // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -36,7 +35,6 @@ #include #include #include -#define __STRICT_ANSI__ #include #include #include @@ -395,7 +393,7 @@ void wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) { - if(hostname.length() == 0) + if( hostname.empty() ) { m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST; m_BeaconPort = 80; @@ -404,7 +402,7 @@ void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) // does hostname contain a port number? wxString port = hostname.After(wxT(':')); - if(port.length()) + if( !port.empty() ) { m_BeaconHost = hostname.Before(wxT(':')); m_BeaconPort = wxAtoi(port); @@ -608,7 +606,10 @@ wxDialUpManagerImpl::CheckProcNet() while (fgets(output, 256, f) != NULL) { - if ( strstr(output, "eth") ) // network card + // Test for the known network interface names + if ( strstr(output, "eth") + || strstr(output, "wlan") + || strstr(output, "ath") ) { netDevice |= NetDevice_LAN; } @@ -667,7 +668,7 @@ wxDialUpManagerImpl::CheckIfconfig() { wxLogNull ln; // suppress all error messages - wxASSERT_MSG( m_IfconfigPath.length(), + wxASSERT_MSG( !m_IfconfigPath.empty(), wxT("can't use ifconfig if it wasn't found") ); wxString tmpfile = wxFileName::CreateTempFileName( wxT("_wxdialuptest") ); @@ -679,7 +680,7 @@ wxDialUpManagerImpl::CheckIfconfig() defined(__SOLARIS__) || defined (__SUNOS__) // need to add -a flag cmd << wxT(" -a"); -#elif defined(__LINUX__) || defined(__SGI__) +#elif defined(__LINUX__) || defined(__SGI__) || defined(__OPENBSD__) // nothing to be added to ifconfig #elif defined(__FREEBSD__) || defined(__DARWIN__) || defined(__QNX__) // add -l flag @@ -720,7 +721,8 @@ wxDialUpManagerImpl::CheckIfconfig() // dialup device under SunOS/Solaris hasModem = strstr(output.fn_str(),"ipdptp") != NULL; hasLAN = strstr(output.fn_str(), "hme") != NULL; -#elif defined(__LINUX__) || defined (__FREEBSD__) || defined (__QNX__) +#elif defined(__LINUX__) || defined (__FREEBSD__) || defined (__QNX__) || \ + defined(__OPENBSD__) hasModem = strstr(output.fn_str(),"ppp") // ppp || strstr(output.fn_str(),"sl") // slip || strstr(output.fn_str(),"pl"); // plip