From 1aa221a2bc0a5c2f13a8d95af76a755b3c731251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 12 Jun 2019 12:50:07 +0200 Subject: Change tests for glibc version. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It resolves building with libc libraries other than glibc - for example musl libc. Signed-off-by: Slávek Banko --- src/tools/qdir_unix.cpp | 8 ++++---- src/tools/qfileinfo_unix.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/tools') diff --git a/src/tools/qdir_unix.cpp b/src/tools/qdir_unix.cpp index 87976bdd..7e23fca7 100644 --- a/src/tools/qdir_unix.cpp +++ b/src/tools/qdir_unix.cpp @@ -74,7 +74,7 @@ TQString TQDir::homeDirPath() TQString TQDir::canonicalPath() const { TQString r; -#if defined(__GLIBC__) && !defined(PATH_MAX) +#if !defined(PATH_MAX) char *cur = ::get_current_dir_name(); if ( cur ) { char *tmp = canonicalize_file_name( TQFile::encodeName( dPath ).data() ); @@ -103,7 +103,7 @@ TQString TQDir::canonicalPath() const // FIXME } } -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ return r; } @@ -165,7 +165,7 @@ TQString TQDir::currentDirPath() struct stat st; if ( ::stat( ".", &st ) == 0 ) { -#if defined(__GLIBC__) && !defined(PATH_MAX) +#if !defined(PATH_MAX) char *currentName = ::get_current_dir_name(); if ( currentName ) { result = TQFile::decodeName(currentName); @@ -175,7 +175,7 @@ TQString TQDir::currentDirPath() char currentName[PATH_MAX+1]; if ( ::getcwd( currentName, PATH_MAX ) ) result = TQFile::decodeName(currentName); -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ #if defined(QT_DEBUG) if ( result.isNull() ) tqWarning( "TQDir::currentDirPath: getcwd() failed" ); diff --git a/src/tools/qfileinfo_unix.cpp b/src/tools/qfileinfo_unix.cpp index 0bf14384..aed39e46 100644 --- a/src/tools/qfileinfo_unix.cpp +++ b/src/tools/qfileinfo_unix.cpp @@ -133,7 +133,7 @@ TQString TQFileInfo::readLink() const if ( !isSymLink() ) return TQString(); #if defined(Q_OS_UNIX) && !defined(Q_OS_OS2EMX) -#if defined(__GLIBC__) && !defined(PATH_MAX) +#if !defined(PATH_MAX) int size = 256; char *s = NULL, *s2; @@ -165,7 +165,7 @@ TQString TQFileInfo::readLink() const s[len] = '\0'; return TQFile::decodeName(s); } -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ #endif /* Q_OS_UNIX && !Q_OS_OS2EMX */ #if !defined(TQWS) && defined(Q_OS_MAC) { -- cgit v1.2.3