Change tests for glibc version.

It resolves building with libc libraries
other than glibc - for example musl libc.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit edad20d4f9)
v3.5.13-sru
Slávek Banko 6 years ago
parent cf5e27248b
commit fcb9b0f5fc
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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" );

@ -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)
{

Loading…
Cancel
Save