summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimedatabase_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-10-09 15:25:18 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-10-22 10:07:01 +0000
commit6c543879a31d7d13a6b87e6332f6913f2f89f5e6 (patch)
treea4471a1ba1a5c89b20a0f8741f81f0729686e94e /src/corelib/mimetypes/qmimedatabase_p.h
parenta7518a11b6975e1fb1ad8584fd4f5fa6b434d839 (diff)
Avoid races on TZ in environment via tzset() calls
POSIX specifies that tzset() consults environment variable TZ and modifies some globals; it also specifies mktime(), localtime() and strftime() to behave as if they called tzset(). Fortunately, we only call strftime() from a test and only call localtime() when not threaded. Provide wrappers for tzset() and mktime() that share the lock used by our environment-access code, to prevent races on the environment (and tzset()'s globals) when we call them. In the process, re-use tst_QDateTime's TimeZoneRollback in its older test systemTimeZoneChange() and presume that this can now be tested cross-platform, since TimeZoneRollback is used in another test where this works. Fixes: QTBUG-71030 Change-Id: I79f559b8857ea2803e73501008bf0d7158c6731f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/mimetypes/qmimedatabase_p.h')
0 files changed, 0 insertions, 0 deletions