summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-07-30 19:16:19 +0900
committerOBATA Akio <obache@wizdas.com>2021-06-20 15:03:46 +0900
commitda5ff5c86492a665c59a5032027bde04960c8217 (patch)
tree20cd63c694d46088de2fe5e7f472f44690efb7bf /src
parent1007a44d71862a322e703cbdb1b242515d64265d (diff)
downloadtqt3-da5ff5c86492a665c59a5032027bde04960c8217.tar.gz
tqt3-da5ff5c86492a665c59a5032027bde04960c8217.zip
Add Interix supportfeat/add-interix-support
Signed-off-by: OBATA Akio <obache@wizdas.com>
Diffstat (limited to 'src')
-rw-r--r--src/codecs/qtextcodec.cpp6
-rw-r--r--src/kernel/qlock.cpp2
-rw-r--r--src/tools/ntqglobal.h4
-rw-r--r--src/tools/qdatastream.cpp4
4 files changed, 14 insertions, 2 deletions
diff --git a/src/codecs/qtextcodec.cpp b/src/codecs/qtextcodec.cpp
index c37a7cb1..458dc5d0 100644
--- a/src/codecs/qtextcodec.cpp
+++ b/src/codecs/qtextcodec.cpp
@@ -85,7 +85,13 @@
#include <locale.h>
#endif
#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX6)
+#ifdef Q_OS_INTERIX
+extern "C" {
+#endif
#include <langinfo.h>
+#ifdef Q_OS_INTERIX
+}
+#endif
#endif
static TQValueList<TQTextCodec*> *all = 0;
diff --git a/src/kernel/qlock.cpp b/src/kernel/qlock.cpp
index 948e7602..f53afc49 100644
--- a/src/kernel/qlock.cpp
+++ b/src/kernel/qlock.cpp
@@ -50,7 +50,7 @@
#define _WANT_SEMUN
#include <sys/sem.h>
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \
- || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_BSDI)
+ || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_BSDI) || defined(Q_OS_INTERIX)
/* union semun is defined by including <sys/sem.h> */
#else
/* according to X/OPEN we have to define it ourselves */
diff --git a/src/tools/ntqglobal.h b/src/tools/ntqglobal.h
index 8bc73aed..ab4d1101 100644
--- a/src/tools/ntqglobal.h
+++ b/src/tools/ntqglobal.h
@@ -66,6 +66,7 @@
NETBSD - NetBSD
OPENBSD - OpenBSD
BSDI - BSD/OS
+ INTERIX - Interix
IRIX - SGI Irix
OSF - HP Tru64 UNIX
SCO - SCO OpenServer 5
@@ -131,6 +132,9 @@
#elif defined(__bsdi__)
# define Q_OS_BSDI
# define Q_OS_BSD4
+#elif defined(__INTERIX)
+# define Q_OS_INTERIX
+# define Q_OS_BSD4
#elif defined(__sgi)
# define Q_OS_IRIX
#elif defined(__osf__)
diff --git a/src/tools/qdatastream.cpp b/src/tools/qdatastream.cpp
index d5b7162f..b17502cd 100644
--- a/src/tools/qdatastream.cpp
+++ b/src/tools/qdatastream.cpp
@@ -489,6 +489,8 @@ void TQDataStream::setByteOrder( int bo )
#if defined(Q_OS_HPUX) && !defined(__LP64__)
extern "C" long long __strtoll( const char *, char**, int );
+#elif defined(Q_OS_INTERIX)
+extern "C" long long strtoq( const char *, char**, int );
#endif
static TQ_INT64 read_int_ascii( TQDataStream *s )
@@ -513,7 +515,7 @@ static TQ_INT64 read_int_ascii( TQDataStream *s )
return _atoi64( buf );
# elif defined(Q_OS_HPUX)
return __strtoll( buf, (char**)0, 10 );
-# elif defined(Q_OS_MACX) && defined(QT_MACOSX_VERSION) && QT_MACOSX_VERSION < 0x1020
+# elif defined(Q_OS_MACX) && defined(QT_MACOSX_VERSION) && QT_MACOSX_VERSION < 0x1020 || defined(Q_OS_INTERIX)
return strtoq( buf, (char**)0, 10 );
# else
return strtoll( buf, (char**)0, 10 ); // C99 function