From fcb9b0f5fcb390b2aa6f4812539d511e0e9c1671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 12 Jun 2019 15:41:30 +0200 Subject: [PATCH] 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 (cherry picked from commit edad20d4f9ef3de0b91c163361803f12fc7212bc) --- mkspecs/linux-clang/qplatformdefs.h | 4 ---- mkspecs/linux-cxx/qplatformdefs.h | 4 ---- mkspecs/linux-ecc-64/qplatformdefs.h | 4 ---- mkspecs/linux-g++-32/qplatformdefs.h | 4 ---- mkspecs/linux-g++-64/qplatformdefs.h | 4 ---- mkspecs/linux-g++-sparc/qplatformdefs.h | 4 ---- mkspecs/linux-g++/qplatformdefs.h | 4 ---- mkspecs/linux-icc/qplatformdefs.h | 4 ---- mkspecs/linux-kcc/qplatformdefs.h | 4 ---- mkspecs/linux-kylix/qplatformdefs.h | 4 ---- mkspecs/linux-pgcc/qplatformdefs.h | 4 ---- mkspecs/lynxos-g++/qplatformdefs.h | 4 ---- src/3rdparty/libmng/config.guess | 10 +--------- src/tools/qdir_unix.cpp | 8 ++++---- src/tools/qfileinfo_unix.cpp | 4 ++-- 15 files changed, 7 insertions(+), 63 deletions(-) diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h index 42a0e47..0d8c175 100644 --- a/mkspecs/linux-clang/qplatformdefs.h +++ b/mkspecs/linux-clang/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-cxx/qplatformdefs.h +++ b/mkspecs/linux-cxx/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-ecc-64/qplatformdefs.h +++ b/mkspecs/linux-ecc-64/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-g++-32/qplatformdefs.h b/mkspecs/linux-g++-32/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-g++-32/qplatformdefs.h +++ b/mkspecs/linux-g++-32/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-g++-64/qplatformdefs.h b/mkspecs/linux-g++-64/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-g++-64/qplatformdefs.h +++ b/mkspecs/linux-g++-64/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-g++-sparc/qplatformdefs.h b/mkspecs/linux-g++-sparc/qplatformdefs.h index 42a0e47..0d8c175 100644 --- a/mkspecs/linux-g++-sparc/qplatformdefs.h +++ b/mkspecs/linux-g++-sparc/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h index 42a0e47..0d8c175 100644 --- a/mkspecs/linux-g++/qplatformdefs.h +++ b/mkspecs/linux-g++/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-icc/qplatformdefs.h b/mkspecs/linux-icc/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-icc/qplatformdefs.h +++ b/mkspecs/linux-icc/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h index 9df75e3..619e547 100644 --- a/mkspecs/linux-kcc/qplatformdefs.h +++ b/mkspecs/linux-kcc/qplatformdefs.h @@ -94,11 +94,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-kylix/qplatformdefs.h b/mkspecs/linux-kylix/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-kylix/qplatformdefs.h +++ b/mkspecs/linux-kylix/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h index e25bc1e..30b3d5b 100644 --- a/mkspecs/linux-pgcc/qplatformdefs.h +++ b/mkspecs/linux-pgcc/qplatformdefs.h @@ -91,11 +91,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h index 56f4be6..ef6f0ed 100644 --- a/mkspecs/lynxos-g++/qplatformdefs.h +++ b/mkspecs/lynxos-g++/qplatformdefs.h @@ -76,11 +76,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/src/3rdparty/libmng/config.guess b/src/3rdparty/libmng/config.guess index dff9e48..c604127 100755 --- a/src/3rdparty/libmng/config.guess +++ b/src/3rdparty/libmng/config.guess @@ -861,15 +861,7 @@ EOF int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif + printf ("%s-pc-linux-gnu\n", argv[1]); #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif diff --git a/src/tools/qdir_unix.cpp b/src/tools/qdir_unix.cpp index 0b297ca..4021c7f 100644 --- a/src/tools/qdir_unix.cpp +++ b/src/tools/qdir_unix.cpp @@ -74,7 +74,7 @@ QString QDir::homeDirPath() QString QDir::canonicalPath() const { QString r; -#if defined(__GLIBC__) && !defined(PATH_MAX) +#if !defined(PATH_MAX) char *cur = ::get_current_dir_name(); if ( cur ) { char *tmp = canonicalize_file_name( QFile::encodeName( dPath ).data() ); @@ -100,7 +100,7 @@ QString QDir::canonicalPath() const // always make sure we go back to the current dir ::chdir( cur ); } -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ return r; } @@ -162,7 +162,7 @@ QString QDir::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 = QFile::decodeName(currentName); @@ -172,7 +172,7 @@ QString QDir::currentDirPath() char currentName[PATH_MAX+1]; if ( ::getcwd( currentName, PATH_MAX ) ) result = QFile::decodeName(currentName); -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ #if defined(QT_DEBUG) if ( result.isNull() ) qWarning( "QDir::currentDirPath: getcwd() failed" ); diff --git a/src/tools/qfileinfo_unix.cpp b/src/tools/qfileinfo_unix.cpp index cddb8f9..0ca0917 100644 --- a/src/tools/qfileinfo_unix.cpp +++ b/src/tools/qfileinfo_unix.cpp @@ -133,7 +133,7 @@ QString QFileInfo::readLink() const if ( !isSymLink() ) return QString(); #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 @@ QString QFileInfo::readLink() const s[len] = '\0'; return QFile::decodeName(s); } -#endif /* __GLIBC__ && !PATH_MAX */ +#endif /* !PATH_MAX */ #endif /* Q_OS_UNIX && !Q_OS_OS2EMX */ #if !defined(QWS) && defined(Q_OS_MAC) {