OSDN Git Service

generic: make use of Katie's OS definitions
authorIvailo Monev <xakepa10@gmail.com>
Thu, 18 Feb 2021 16:03:31 +0000 (18:03 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 18 Feb 2021 16:03:31 +0000 (18:03 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kdenetwork-filesharing/samba/filepropertiesplugin/model.cpp
kfloppy/debug.h
kmix/backends/kmix-backends.cpp
kmix/backends/mixer_oss.cpp
kompare/libkomparediff2/kompareprocess.cpp

index 2accd9f..6e660f5 100644 (file)
@@ -52,7 +52,7 @@ QStringList UserPermissionModel::getUsersList() const
     unsigned int defminuid;
     unsigned int defmaxuid;
 
-#ifdef __linux__
+#ifdef Q_OS_LINUX
     struct stat st;
     if (!stat("/etc/debian_version", &st)) { /* debian */
         defminuid = 1000;
index fdc4cdd..774f786 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef DEBUG_H
 #define DEBUG_H
 
+#include <qglobal.h>
+
 /**
  * \file debug.h
  *
 // to one known kind.
 //
 //
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
 #define ANY_BSD        (1)
 #else
-#if defined(linux) || defined(LINUX) || defined (__linux) || defined(__linux__)
+#if defined(Q_OS_LINUX)
 #define ANY_LINUX (1)
 #endif
 #endif
index 35a14a5..c88c20d 100644 (file)
 
 
 
-#if defined(sun) || defined(__sun__)
+#if defined(Q_OS_SOLARIS)
 #define SUN_MIXER
-#endif
-
-#ifdef __linux__
-
+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
 #define OSS_MIXER
 #endif
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(_UNIXWARE)
-#define OSS_MIXER
-#endif
-
-#if defined(hpux)
-#error "The HP/UX port is not maintained anymore, an no official part of KMix / KDE at this point of time! Please contact the current KMix maintainer if you would like to maintain the port."
-#endif // hpux
-
 // PORTING: add #ifdef PLATFORM , commands , #endif, add your new mixer below
 
 // Compiled by its own!
 #if defined(OSS_MIXER)
 #include "backends/mixer_oss.cpp"
 
-#if !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(Q_OS_NETBSD) && !defined(Q_OS_OPENBSD)
 #include <sys/soundcard.h>
 #else
 #include <soundcard.h>
 #endif
-#if !defined(__FreeBSD__) && (SOUND_VERSION >= 0x040000)
+#if !defined(Q_OS_FREEBSD) && (SOUND_VERSION >= 0x040000)
 #define OSS4_MIXER
 #endif
 #endif
index 9cf23c9..acd3c2c 100644 (file)
@@ -31,7 +31,7 @@
 #include <sys/stat.h>
 
 // Since we're guaranteed an OSS setup here, let's make life easier
-#if !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(Q_OS_NETBSD) && !defined(Q_OS_OPENBSD)
        #include <sys/soundcard.h>
 #else
        #include <soundcard.h>
index b2057ab..a916236 100644 (file)
@@ -133,7 +133,7 @@ void KompareProcess::writeCommandLine()
        if ( m_diffSettings->m_largeFiles
 // default diff does not have -H on OpenBSD
 // so don't pass this option unless the user overrode the default program
-#if defined(__OpenBSD__)
+#if defined(Q_OS_OPENBSD)
                && !m_diffSettings->m_diffProgram.isEmpty()
 #endif
           )