diff --git a/kdecore/io/kfilesystemtype_p.cpp b/kdecore/io/kfilesystemtype_p.cpp index 1344e792..e9343f9d 100644 --- a/kdecore/io/kfilesystemtype_p.cpp +++ b/kdecore/io/kfilesystemtype_p.cpp @@ -43,7 +43,7 @@ inline KFileSystemType::Type kde_typeFromName(const char *name) return KFileSystemType::Other; } -#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) +#if defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) || defined(Q_OS_OPENBSD) # include # include diff --git a/kdecore/io/kprocess.cpp b/kdecore/io/kprocess.cpp index ed45ceb2..c161e0e7 100644 --- a/kdecore/io/kprocess.cpp +++ b/kdecore/io/kprocess.cpp @@ -238,45 +238,8 @@ void KProcess::setShellCommand(const QString &cmd) d->args.clear(); -#ifdef Q_OS_UNIX -// #ifdef NON_FREE // ... as they ship non-POSIX /bin/sh -# if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__GNU__) - // If /bin/sh is a symlink, we can be pretty sure that it points to a - // POSIX shell - the original bourne shell is about the only non-POSIX - // shell still in use and it is always installed natively as /bin/sh. - d->prog = QFile::symLinkTarget(QString::fromLatin1("/bin/sh")); - if (d->prog.isEmpty()) { - // Try some known POSIX shells. - d->prog = KStandardDirs::findExe(QString::fromLatin1("ksh")); - if (d->prog.isEmpty()) { - d->prog = KStandardDirs::findExe(QString::fromLatin1("ash")); - if (d->prog.isEmpty()) { - d->prog = KStandardDirs::findExe(QString::fromLatin1("bash")); - if (d->prog.isEmpty()) { - d->prog = KStandardDirs::findExe(QString::fromLatin1("zsh")); - if (d->prog.isEmpty()) - // We're pretty much screwed, to be honest ... - d->prog = QString::fromLatin1("/bin/sh"); - } - } - } - } -# else d->prog = QString::fromLatin1("/bin/sh"); -# endif - d->args << QString::fromLatin1("-c") << cmd; -#else // Q_OS_UNIX - // KMacroExpander::expandMacrosShellQuote(), KShell::quoteArg() and - // KShell::joinArgs() may generate these for security reasons. - setEnv(PERCENT_VARIABLE, QLatin1String("%")); - - WCHAR sysdir[MAX_PATH + 1]; - UINT size = GetSystemDirectoryW(sysdir, MAX_PATH + 1); - d->prog = QString::fromUtf16((const ushort *) sysdir, size); - d->prog += QLatin1String("\\cmd.exe"); - setNativeArguments(QLatin1String("/V:OFF /S /C \"") + cmd + QLatin1Char('"')); -#endif } QStringList KProcess::program() const diff --git a/kdecore/tests/kprocesstest.cpp b/kdecore/tests/kprocesstest.cpp index 80c8109b..d7b5d158 100644 --- a/kdecore/tests/kprocesstest.cpp +++ b/kdecore/tests/kprocesstest.cpp @@ -77,8 +77,7 @@ void KProcessTest::test_channels() void KProcessTest::test_setShellCommand() { -// Condition copied from kprocess.cpp -#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__GNU__) +#if !defined(Q_OS_UNIX) QSKIP("This test needs a free UNIX system", SkipSingle); #else KProcess p; diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index e74781ee..b46c45d7 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -1847,7 +1847,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr static bool fileSystemSupportsACL( const QByteArray& path ) { bool fileSystemSupportsACLs = false; -#ifdef Q_OS_FREEBSD +#if defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) struct statfs buf; fileSystemSupportsACLs = ( statfs( path.data(), &buf ) == 0 ) && ( buf.f_flags & MNT_ACLS ); #else diff --git a/kpty/kpty.cpp b/kpty/kpty.cpp index e800362a..9f4ff8aa 100644 --- a/kpty/kpty.cpp +++ b/kpty/kpty.cpp @@ -98,7 +98,7 @@ extern "C" { #if defined HAVE_TCGETATTR # define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode) -#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(__DragonFly__) +#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_DRAGONFLY) # define _tcgetattr(fd, ttmode) ioctl(fd, TIOCGETA, (char *)ttmode) #else # define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode) @@ -106,7 +106,7 @@ extern "C" { #if defined HAVE_TCSETATTR # define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode) -#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(__DragonFly__) +#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_DRAGONFLY) # define _tcsetattr(fd, ttmode) ioctl(fd, TIOCSETA, (char *)ttmode) #else # define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode) diff --git a/kpty/kptydevice.cpp b/kpty/kptydevice.cpp index 3323275d..2e30a9cc 100644 --- a/kpty/kptydevice.cpp +++ b/kpty/kptydevice.cpp @@ -44,7 +44,7 @@ # include #endif -#if defined(Q_OS_FREEBSD) +#if defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) // "the other end's output queue size" - kinda braindead, huh? # define PTY_BYTES_AVAILABLE TIOCOUTQ #elif defined(TIOCINQ) diff --git a/solid/solid/backends/udisks/udisksstorageaccess.cpp b/solid/solid/backends/udisks/udisksstorageaccess.cpp index 5bd50361..26346d52 100644 --- a/solid/solid/backends/udisks/udisksstorageaccess.cpp +++ b/solid/solid/backends/udisks/udisksstorageaccess.cpp @@ -179,7 +179,7 @@ void UDisksStorageAccess::slotDBusReply( const QDBusMessage & reply ) QString program = "cdio"; QStringList args; args << "-f" << devnode << "eject"; -#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) +#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_DRAGONFLY) devnode.remove("/dev/").replace("([0-9]).", "\\1"); QString program = "cdcontrol"; QStringList args;