From a10768455352eb3e49b2123234cd096a032d3474 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 1 Sep 2014 12:46:39 +0300 Subject: Revert previous QFileDialog fix for Solaris This reverts previous commit 6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04, that broke compilation of QFileDialog in solaris (Sun CC). Solaris defaults to Draft version of getpwnam_r if _POSIX_C_SOURCE is not defined or < 199506L, and _POSIX_VERSION is defined as 199506L even when _POSIX_C_SOURCE is not used, so it cannot be used to detect correct posix support. Task-number: QTBUG-21451 Change-Id: Ibbf2b9de1dea74e7d8b6003d1a4e3686e5858525 Reviewed-by: Marc Mutz Reviewed-by: Milla Pohjanheimo Reviewed-by: Iikka Eklund --- src/gui/dialogs/qfiledialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 3868c21..12591da 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -903,7 +903,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded char buf[200]; const int bufSize = sizeof(buf); int err = 0; -#if defined(Q_OS_SOLARIS) && defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 < 199506L) +#if defined(Q_OS_SOLARIS) && (_POSIX_C_SOURCE - 0 < 199506L) tmpPw = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize); #else err = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize, &tmpPw); -- cgit v0.12