summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-241-50/+0
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-181-50/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QHostInfo: adapt to glibc 2.26 no longer requiring us to res_initThiago Macieira2017-09-221-18/+56
|/ | | | | | | | | | | | | | | | | | | | | From the announcement[1] - The GNU C Library will now detect when /etc/resolv.conf has been modified and reload the changed configuration. The new resolver option “no-reload” (RES_NORELOAD) disables this behavior. Since glibc can do it, we don't have to call res_init before every single getaddrinfo() call. And since we don't need to call res_init, we don't need to load libresolv.so at all, until we need res_ninit. We won't do it even if the user configured "no-reload" in /etc/resolv.conf or RES_NORELOAD in the res variable -- let's assume that it is the intent, like when /etc/resolv.conf is known to never change. [1] https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html Change-Id: I3868166e5efc45538544fffd14d738d40c375fd1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHostInfo: Remove Darwin refusal to use getnameinfo(3)Thiago Macieira2017-08-241-2/+1
| | | | | | | | | | | | | | | | | This #if has been there since 0248ec4054b (Oct 2005), presumably due to bugs reported after the Qt 4.0 release (the first containing QHostInfo). Any macOS issues with getnameinfo() have long since been gone. I've confirmed that it works on 10.9, 10.10, 10.11 and 10.12, so I'm dropping the #ifndef. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support will be mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I320d9d2f42284a69a4cbfffd14dd5bf479e5f678 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-1/+3
| | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-11/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * Remove the use of QMutexPool in QHostInfo and QDnsLookupThiago Macieira2016-04-301-11/+6
| | | | | | | | | | | | | | | | Q_GLOBAL_STATIC does the thread-safe protection for us. And who said we could only use non-POD types? We can just use a boolean! Change-Id: Ifea6e497f11a461db432ffff1449b0a88d75d194 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge the multiple implementations of getting the local hostnameThiago Macieira2015-08-131-9/+0
| | | | | | | | | | | | | | | | This commit moves the functionality from QtNetwork's QHostInfo to QtCore. Note that due to Windows ws2_32.dll's quirky behavior of requiring WSAStartup before calling gethostname, this change required moving the initialization to QtCore too. On Linux systems, gethostname() gets the name from uname(), so we bypass the middle man and save one memcpy. Change-Id: I27eaacb532114dd188c4ffff13d32655a6301346 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * Don't include <gnu/lib-names.h> when compiling with uClibcJorgen Lind2014-01-231-1/+1
| | | | | | | | | | Change-Id: I5264280b7ce1e94eaf410a070f9670984f7a655b Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-3/+3
|/ | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix loading of libresolv when the .so file (not .so.2) isn't installedThiago Macieira2013-10-161-2/+13
| | | | | | | | | | | glibc is nice to us and provides a #define with the actual name. On most Linux systems, the .so file is installed only if the glibc-devel package is installed. For all of us Qt developers, it's installed. But for end users, it might not be. Change-Id: Id455371db91a074befd3bcd071f285c725d7e7e5 Reviewed-by: Ian Monroe <imonroe@kde.org> Reviewed-by: Richard J. Moore <rich@kde.org>
* QNX host lookup: do not try to load libresolv.so, it is not therePeter Hartmann2013-04-241-1/+1
| | | | | | | | | | Not trying to load the lib saves 30 - 50ms upon an apps' 1st host lookup. Task-number: QTBUG-30809 Change-Id: Id893cec09ff57494776625700c93f7efe96fcc6b Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Introducing the Qt Android portPaul Olav Tvete2013-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QHostInfo: replace a volatile bool with an atomic intMarc Mutz2012-08-291-4/+5
| | | | | | | | | | | | A volatile bool read/store is documented on MSVC to have acquire/release semantics, respectively, but that doesn't need to be true for MinGW, so use explicit memory ordering. Apply the same fix to the Unix implementation, too. Change-Id: Ica466cec50beed830aafa4e3384d82f02e1a47e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Android's resolv.h is busted, so stub out QHostInfo::localDomainName().Robin Burchell2012-05-021-1/+1
| | | | | | Change-Id: Idcf5ca7298eed55121b690906885af0eb3fe0b9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Use QBasicMutex instead of Q_GLOBAL_STATIC QMutexOlivier Goffart2012-02-011-6/+3
| | | | | | | | | | | | | | QBasicMutex is a POD and can be used as a static global object. in qpicture.cpp factoryLoader is used only once, and under the mutex, so there is no need for Q_GLOBAL_STATIC for it, it can be a function static in qhostinfo_unix.cpp the code seemed wrong while compiled with namespace and QT_NO_GETADDRINFO. I also could get rid of one include because it was included earlier. Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-061-2/+2
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Always assume IPv6 supportMarkus Goetz2011-07-041-6/+0
| | | | | | | | | | | It's 2011 baby! And until Qt5 is released probably 2012 :-) Change-Id: I397aabf25e93c8afb5f562636710985cf0c7acfa Reviewed-on: http://codereview.qt.nokia.com/1008 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> Reviewed-by: Markus Goetz
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+396
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12