This is the first part of the replacement process.
Usage of Q_WS_* has been replaced with the equivalent TQ_WS_*.
Definition of Q_WS_* has been mirrored into TQ_WS_* defines, to allow
TDE code to continue building till replacement is carried over to all
other modules.
Once that is completed, the original Q_WS_* defines will
be removed.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Commit b167d09c was functionally incorrect and is causing issues on
selected distributions.
This reverts commit b167d09c43.
This resolves issue TDE/tde#128.
When using the pthreads recursive mutex, the level method was only able
to return either zero or one, but a recursive mutex can be locked more
than once.
Additionally, the way this detected if the mutex was already locked was
to test whether it can be locked again. If testing from the thread that
is currently holding the lock, this locking attempt always succeeds, and
therefore determines that the lock is _not_ held at all. This is
especially bad, as this operation only makes sense to perform from the
thread that holds the lock -- if any thread not holding the lock queries
the number of times the lock is held, that answer can change before the
thread can used it.
Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
This helps keeping the object root list shorter, speeding up operations
which require lot of TQObject trees. This relates to TDE/tdebase#309.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
This restores consistency for the behavior of methods TQString::utf8()
and TQString::local8Bit() with null TQStrings.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Thread ID is opaque type pthread_t, it may not be compatible with integer,
and may integer with valid id `0`.
Change to store mutex owner thread ID as `pthread_t` type with valid flag
and compare with `pthread_equal()`,
and don't try to print it.
Signed-off-by: OBATA Akio <obache@wizdas.com>
Avoid parsing over the buffer limit, or interpreting non-hex as hex.
This still leaves parsing of lines longer than 300 chars unreliable.
Based on Qt5 patch for CVE-2020-17507.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
If `_POSIX_THREAD_PRIORITY_SCHEDULING == 0`, it must be checked
with sysconf(_SC_THREAD_PRIORITY_SCHEDULING) at runtime.
Signed-off-by: OBATA Akio <obache@wizdas.com>
`__RES` is usable to check release date of resolver library.
Such modern res API appeared in BIND-8.2.0 libbind with `__RES == 19980901`,
it was refrected as BIND-8.2.2-P5 to glibc at pre 2.3 release with
`__RES == 19991006`.
Signed-off-by: OBATA Akio <obache@wizdas.com>