testlib: fileno is also deprecated in UCRT

The non-standard name was made to have a leading underscore.
Apply same #define trick to it as was done for isatty.

Amends 8fd8dd0492

Change-Id: I5d465e32b2fa0caf1d6fb68fa6fe2da8c36b7fc6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Mårten Nordheim 2025-09-15 16:39:15 +02:00
parent 2eefeff364
commit c7b3cb5f2a
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,7 @@ void QAbstractTestLogger::outputString(const char *msg)
#if defined(Q_OS_WINDOWS) #if defined(Q_OS_WINDOWS)
#define isatty _isatty #define isatty _isatty
#define fileno _fileno
#endif #endif
if (isatty(fileno(stream))) { if (isatty(fileno(stream))) {
@ -222,6 +223,7 @@ void QAbstractTestLogger::outputString(const char *msg)
#if defined(Q_OS_WINDOWS) #if defined(Q_OS_WINDOWS)
#undef isatty #undef isatty
#undef fileno
#endif #endif
} }