diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-12 01:19:14 +0300 |
|---|---|---|
| committer | Alexander Golubev <fatzer2@gmail.com> | 2024-03-14 00:11:47 +0300 |
| commit | f7642b09c9e61f71e434aeb0ceb330d2ccaa25db (patch) | |
| tree | 24caf3ca34bc91f4c3ea20b8fc436fdd71c44925 /src/tools/qdatetime.cpp | |
| parent | fa4475f36d6404a70d760ca95ac6a986a8846a3f (diff) | |
| download | tqt-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.tar.gz tqt-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.zip | |
TQT_THREAD_SUPPORT->!TQT_NO_THREAD: migrate sources
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src/tools/qdatetime.cpp')
| -rw-r--r-- | src/tools/qdatetime.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/qdatetime.cpp b/src/tools/qdatetime.cpp index 51f0e51de..dbb1e390f 100644 --- a/src/tools/qdatetime.cpp +++ b/src/tools/qdatetime.cpp @@ -1039,7 +1039,7 @@ TQDate TQDate::currentDate( TQt::TimeSpec ts ) time( <ime ); tm *t; -# if defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +# if !defined(TQT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant versions of localtime() and gmtime() where available tm res; if ( ts == TQt::LocalTime ) @@ -1051,7 +1051,7 @@ TQDate TQDate::currentDate( TQt::TimeSpec ts ) t = localtime( <ime ); else t = gmtime( <ime ); -# endif // TQT_THREAD_SUPPORT && _POSIX_THREAD_SAFE_FUNCTIONS +# endif // !TQT_NO_THREAD && _POSIX_THREAD_SAFE_FUNCTIONS d.jd = gregorianToJulian( t->tm_year + 1900, t->tm_mon + 1, t->tm_mday ); #endif @@ -1729,7 +1729,7 @@ bool TQTime::currentTime( TQTime *ct, TQt::TimeSpec ts ) time_t ltime = tv.tv_sec; tm *t; -# if defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +# if !defined(TQT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // use the reentrant versions of localtime() and gmtime() where available tm res; if ( ts == TQt::LocalTime ) @@ -1741,7 +1741,7 @@ bool TQTime::currentTime( TQTime *ct, TQt::TimeSpec ts ) t = localtime( <ime ); else t = gmtime( <ime ); -# endif // TQT_THREAD_SUPPORT && _POSIX_THREAD_SAFE_FUNCTIONS +# endif // !TQT_NO_THREAD && _POSIX_THREAD_SAFE_FUNCTIONS ct->ds = (uint)( MSECS_PER_HOUR * t->tm_hour + MSECS_PER_MIN * t->tm_min + 1000 * t->tm_sec + tv.tv_usec / 1000 ); @@ -2042,7 +2042,7 @@ void TQDateTime::setTime_t( time_t secsSince1Jan1970UTC, TQt::TimeSpec ts ) time_t tmp = secsSince1Jan1970UTC; tm *brokenDown = 0; -#if defined(Q_OS_UNIX) && defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) +#if defined(Q_OS_UNIX) && !defined(TQT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) // posix compliant system // use the reentrant versions of localtime() and gmtime() where available tm res; |
