summaryrefslogtreecommitdiffstats
path: root/src/tools/qdir_unix.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-06-12 12:50:07 +0200
committerSlávek Banko <[email protected]>2019-06-12 15:39:56 +0200
commitd6375a54e2945d494df5ad38ca98cbc8b4d901e7 (patch)
tree078c3bb4a82905e8bcda0409b714a73285e9f181 /src/tools/qdir_unix.cpp
parent6e7a186f1e5bbd7e4b5e9150a422f4bc523efb7f (diff)
downloadtqt3-d6375a54e2945d494df5ad38ca98cbc8b4d901e7.tar.gz
tqt3-d6375a54e2945d494df5ad38ca98cbc8b4d901e7.zip
Change tests for glibc version.
It resolves building with libc libraries other than glibc - for example musl libc. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 1aa221a2bc0a5c2f13a8d95af76a755b3c731251)
Diffstat (limited to 'src/tools/qdir_unix.cpp')
-rw-r--r--src/tools/qdir_unix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/qdir_unix.cpp b/src/tools/qdir_unix.cpp
index 7f316ad71..b66416e89 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" );