generic: make use of Katie's OS definitions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-02-18 18:03:31 +02:00
parent 20f79523f9
commit b0f058a4fc
5 changed files with 11 additions and 20 deletions

View 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;

View file

@ -24,6 +24,8 @@
#ifndef DEBUG_H
#define DEBUG_H
#include <qglobal.h>
/**
* \file debug.h
*
@ -51,10 +53,10 @@
// 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

View file

@ -29,23 +29,12 @@
#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!
@ -59,12 +48,12 @@
#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

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

View 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
)