summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake56
-rw-r--r--drkonqi/backtrace.cpp4
-rw-r--r--kcheckpass/ConfigureChecks.cmake2
-rw-r--r--kcontrol/CMakeLists.txt2
-rw-r--r--kcontrol/displayconfig/displayconfig.cpp7
-rw-r--r--kcontrol/displayconfig/displayconfig.h4
-rw-r--r--kcontrol/randr/tderandrtray.cpp4
-rw-r--r--kcontrol/randr/tderandrtray.h4
-rw-r--r--kicker/kicker/ui/k_new_mnu.cpp26
-rw-r--r--ksmserver/server.cpp4
-rw-r--r--ksmserver/server.h4
-rw-r--r--ksmserver/shutdown.cpp4
-rw-r--r--ksmserver/shutdowndlg.cpp6
-rw-r--r--r14-xdg-update10
-rw-r--r--tdeioslave/ConfigureChecks.cmake6
-rw-r--r--tdeioslave/man/man2html.cpp12
-rw-r--r--tdeioslave/media/mediamanager/CMakeLists.txt37
-rw-r--r--tdeioslave/media/medianotifier/medianotifier.cpp6
-rw-r--r--tdeioslave/media/medianotifier/notificationdialog.cpp2
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp4
-rw-r--r--tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp3
-rw-r--r--tdesu/tdesud/tdesud.cpp4
-rw-r--r--tdm/ConfigureChecks.cmake12
-rw-r--r--tdm/backend/auth.c23
-rw-r--r--tdm/backend/getfd.c4
-rw-r--r--tdm/kfrontend/kgapp.cpp4
-rw-r--r--tdm/kfrontend/kgapp.h4
-rw-r--r--tdm/kfrontend/kgreeter.cpp13
-rw-r--r--twin/compton-tde/common.h2
29 files changed, 207 insertions, 66 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 21ec42001..18e2b5014 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -12,7 +12,10 @@
#
#################################################
+# required stuff
tde_setup_architecture_flags( )
+find_package( TQt )
+find_package( TDE )
##### check for libdl ###########################
@@ -54,6 +57,18 @@ if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) )
endif( )
+# crypt
+set( CRYPT_LIBRARY crypt )
+check_library_exists( ${CRYPT_LIBRARY} crypt "" HAVE_CRYPT )
+if( NOT HAVE_CRYPT )
+ unset( CRYPT_LIBRARY )
+ check_function_exists( crypt LIBC_HAVE_CRYPT )
+ if( LIBC_HAVE_CRYPT )
+ set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE )
+ endif( LIBC_HAVE_CRYPT )
+endif( NOT HAVE_CRYPT )
+
+
# hal (ksmserver, tdeioslaves)
if( WITH_HAL )
pkg_search_module( HAL hal )
@@ -63,6 +78,24 @@ if( WITH_HAL )
endif( )
+# tdehwlib (drkonqi, kcontrol, kicker, ksmserver, tdeioslaves, tdm)
+if( WITH_TDEHWLIB )
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
+ check_cxx_source_compiles( "
+ #include <kdemacros.h>
+ #ifndef __TDE_HAVE_TDEHWLIB
+ #error tdecore is not build with tdehwlib
+ #endif
+ int main() { return 0; } "
+ HAVE_TDEHWLIB
+ )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ if( NOT HAVE_TDEHWLIB )
+ tde_message_fatal( "tdehwlib is required, but not built in tdecore" )
+ endif( NOT HAVE_TDEHWLIB )
+endif( )
+
+
# udev (tsak)
if( BUILD_TSAK )
pkg_search_module( UDEV udev )
@@ -78,8 +111,21 @@ endif( )
if( WITH_GCC_VISIBILITY )
if( NOT UNIX )
- tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
+ tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX )
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
+ check_cxx_source_compiles( "
+ #include <kdemacros.h>
+ #ifndef __KDE_HAVE_GCC_VISIBILITY
+ #error gcc visibility is not enabled in tdelibs
+ #endif
+ int main() { return 0; } "
+ HAVE_GCC_VISIBILITY
+ )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ if( NOT HAVE_GCC_VISIBILITY )
+ tde_message_fatal( "gcc visibility support was requested, but not supported in tdelibs" )
+ endif( NOT HAVE_GCC_VISIBILITY )
set( __KDE_HAVE_GCC_VISIBILITY 1 )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
@@ -322,8 +368,8 @@ else( )
set( WITHOUT_ARTS 1 )
endif( )
-# libart
+# libart
if( WITH_LIBART )
pkg_search_module( LIBART libart-2.0 )
if( NOT LIBART_FOUND )
@@ -333,12 +379,6 @@ if( WITH_LIBART )
endif( WITH_LIBART )
-# required stuff
-find_package( TQt )
-find_package( TDE )
-
-
-
# dbus (tdm, kdesktop, twin/compton-tde.c)
if( BUILD_TDM OR BUILD_KDESKTOP OR (BUILD_TWIN AND WITH_XCOMPOSITE) )
diff --git a/drkonqi/backtrace.cpp b/drkonqi/backtrace.cpp
index 2acd74df5..70bb35fa7 100644
--- a/drkonqi/backtrace.cpp
+++ b/drkonqi/backtrace.cpp
@@ -36,7 +36,9 @@
#include <tdemessagebox.h>
#include <tdelocale.h>
#include <tdetempfile.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#ifdef HAVE_ELFICON
// Elven things
@@ -356,6 +358,7 @@ void BackTrace::processBacktrace()
}
#endif // HAVE_ELFICON
+#ifdef __TDE_HAVE_TDEHWLIB
// Append potentially important hardware information
m_strBt.append("\n==== (tdehwlib) hardware information ====\n");
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@@ -374,6 +377,7 @@ void BackTrace::processBacktrace()
m_strBt.append("\n");
}
}
+#endif
{
// Clean up hard to read debug blocks
diff --git a/kcheckpass/ConfigureChecks.cmake b/kcheckpass/ConfigureChecks.cmake
index 120869dac..d6d62f55b 100644
--- a/kcheckpass/ConfigureChecks.cmake
+++ b/kcheckpass/ConfigureChecks.cmake
@@ -9,8 +9,6 @@
#
#################################################
-find_library( CRYPT_LIBRARY crypt )
-
if( WITH_PAM AND (NOT DEFINED KCHECKPASS_PAM_SERVICE) )
set( KCHECKPASS_PAM_SERVICE "kde" CACHE INTERNAL "" )
endif( )
diff --git a/kcontrol/CMakeLists.txt b/kcontrol/CMakeLists.txt
index ffd8e8346..d45828d10 100644
--- a/kcontrol/CMakeLists.txt
+++ b/kcontrol/CMakeLists.txt
@@ -64,9 +64,9 @@ if( BUILD_KCONTROL )
add_subdirectory( kthememanager )
add_subdirectory( tdefontinst )
add_subdirectory( access )
- add_subdirectory( hwmanager )
tde_conditional_add_subdirectory( WITH_XRANDR displayconfig )
+ tde_conditional_add_subdirectory( WITH_TDEHWLIB hwmanager )
tde_conditional_add_subdirectory( WITH_SAMBA samba )
tde_conditional_add_subdirectory( WITH_XRANDR randr )
tde_conditional_add_subdirectory( WITH_LIBRAW1394 view1394 )
diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp
index db371fc42..835b2598b 100644
--- a/kcontrol/displayconfig/displayconfig.cpp
+++ b/kcontrol/displayconfig/displayconfig.cpp
@@ -57,6 +57,9 @@
#include "displayconfig.h"
using namespace std;
+#ifdef __OpenBSD__
+#define abs __gnu_cxx::abs
+#endif
/**** DLL Interface ****/
typedef KGenericFactory<KDisplayConfig, TQWidget> KDisplayCFactory;
@@ -742,8 +745,10 @@ void KDisplayConfig::setRealResolutionSliderValue(int index) {
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
: TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0)
{
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+#endif
m_randrsimple = new KRandrSimpleAPI();
@@ -859,6 +864,7 @@ KDisplayConfig::~KDisplayConfig()
}
void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
+#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) {
if (base->rescanHardware->isEnabled()) {
base->rescanHardware->setEnabled(false);
@@ -866,6 +872,7 @@ void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
base->rescanHardware->setEnabled(true);
}
}
+#endif
}
void KDisplayConfig::updateExtendedMonitorInformation () {
diff --git a/kcontrol/displayconfig/displayconfig.h b/kcontrol/displayconfig/displayconfig.h
index a52ebb3fc..92fa1f421 100644
--- a/kcontrol/displayconfig/displayconfig.h
+++ b/kcontrol/displayconfig/displayconfig.h
@@ -35,7 +35,11 @@
#include <dcopobject.h>
#include <libtderandr/libtderandr.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#else
+#define TDEGenericDevice void
+#endif
#include "monitorworkspace.h"
#include "displayconfigbase.h"
diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp
index d6a711db7..a443c3781 100644
--- a/kcontrol/randr/tderandrtray.cpp
+++ b/kcontrol/randr/tderandrtray.cpp
@@ -92,8 +92,10 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
applyIccConfiguration(cur_profile, NULL);
}
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+#endif
}
/*!
@@ -886,6 +888,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
}
void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
+#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrPassivePopup::message(
i18n("New display output options are available!"),
@@ -895,6 +898,7 @@ void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
reloadDisplayConfiguration();
applyHotplugRules(locateLocal("config", "/", true));
}
+#endif
}
void KRandRSystemTray::slotHelpContents()
diff --git a/kcontrol/randr/tderandrtray.h b/kcontrol/randr/tderandrtray.h
index 09a1b2671..8f382922f 100644
--- a/kcontrol/randr/tderandrtray.h
+++ b/kcontrol/randr/tderandrtray.h
@@ -25,7 +25,11 @@
#include <kglobalaccel.h>
#include <libtderandr/libtderandr.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#else
+#define TDEGenericDevice void
+#endif
class KHelpMenu;
class TDEPopupMenu;
diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp
index 3e705ba31..a5641168f 100644
--- a/kicker/kicker/ui/k_new_mnu.cpp
+++ b/kicker/kicker/ui/k_new_mnu.cpp
@@ -52,7 +52,9 @@
#include <kdebug.h>
#include <tdeglobal.h>
#include <tdeglobalsettings.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include <kiconloader.h>
#include <klineedit.h>
#include <tdelocale.h>
@@ -93,7 +95,13 @@
#include "flipscrollview.h"
#include "itemview.h"
#include <dmctl.h>
+#ifdef __OpenBSD__
+#include <sys/statvfs.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+#else
#include <sys/vfs.h>
+#endif
#include <mykickoffsearchinterface.h>
#include "media_watcher.h"
@@ -1359,10 +1367,10 @@ void KMenu::insertStaticExitItems()
}
bool maysd = false;
-#ifdef COMPILE_HALBACKEND
+#if defined(COMPILE_HALBACKEND)
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true;
-#else
+#elif defined(__TDE_HAVE_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if( rootDevice ) {
maysd = rootDevice->canPowerOff();
@@ -3792,7 +3800,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
bool suspend_freeze = false;
bool standby = false;
bool suspend_disk = false;
-#ifdef COMPILE_HALBACKEND
+#if defined(COMPILE_HALBACKEND)
suspend_ram = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend",
@@ -3807,7 +3815,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
"/org/freedesktop/Hal/devices/computer",
"power_management.can_hibernate",
NULL);
-#else // COMPILE_HALBACKEND
+#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
suspend_ram = rootDevice->canSuspend();
@@ -3868,7 +3876,7 @@ void KMenu::slotSuspend(int id)
DCOPRef("kdesktop", "KScreensaverIface").call("lock()");
}
-#ifdef COMPILE_HALBACKEND
+#if defined(COMPILE_HALBACKEND)
DBusMessage* msg = NULL;
if (m_dbusConn) {
@@ -3901,7 +3909,7 @@ void KMenu::slotSuspend(int id)
}
dbus_message_unref(msg);
}
-#else // COMPILE_HALBACKEND
+#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
if (id == 1) {
@@ -3916,10 +3924,12 @@ void KMenu::slotSuspend(int id)
return;
}
}
+#else
+ error = false;
#endif
- if (error)
+ if (error) {
KMessageBox::error(this, i18n("Suspend failed"));
-
+ }
}
void KMenu::runUserCommand()
diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp
index 257d5f20c..c9a037397 100644
--- a/ksmserver/server.cpp
+++ b/ksmserver/server.cpp
@@ -598,7 +598,9 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag
clientInteracting = 0;
xonCommand = config->readEntry( "xonCommand", "xon" );
+#ifdef __TDE_HAVE_TDEHWLIB
hwDevices = TDEGlobal::hardwareDevices();
+#endif
connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout()));
connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout()));
@@ -720,6 +722,7 @@ void KSMServer::cleanUp()
DM().shutdown( shutdownType, shutdownMode, bootOption );
}
else {
+#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) {
if (shutdownType == TDEApplication::ShutdownTypeHalt) {
@@ -729,6 +732,7 @@ void KSMServer::cleanUp()
rootDevice->setPowerState(TDESystemPowerState::Reboot);
}
}
+#endif
}
}
diff --git a/ksmserver/server.h b/ksmserver/server.h
index f5e0d37c6..bc677752c 100644
--- a/ksmserver/server.h
+++ b/ksmserver/server.h
@@ -23,7 +23,9 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tqtimer.h>
#include <dcopobject.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include "server2.h"
@@ -251,7 +253,9 @@ private:
WindowMap legacyWindows;
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices* hwDevices;
+#endif
int initialClientCount;
int phase2ClientCount;
int protectionTimerCounter;
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index d7eaafb0e..a40bffc3b 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -152,6 +152,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb,
mayrb = true;
}
else {
+#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) {
if (rootDevice->canPowerOff()) {
@@ -161,6 +162,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb,
mayrb = true;
}
}
+#endif
}
}
if (!maysd) {
@@ -239,6 +241,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
// If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages!
kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData);
}
+#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) {
if (selection == 1) { // Suspend
@@ -251,6 +254,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
rootDevice->setPowerState(TDESystemPowerState::Freeze);
}
}
+#endif
}
}
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 6b3b02428..d4881ad85 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -33,7 +33,9 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tdelocale.h>
#include <tdeconfig.h>
#include <tdeapplication.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include <kdebug.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -805,7 +807,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
bool canSuspend = false;
bool canHibernate = false;
-#ifdef COMPILE_HALBACKEND
+#if defined(COMPILE_HALBACKEND)
// Query HAL for suspend/resume support
m_halCtx = libhal_ctx_new();
@@ -860,7 +862,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
canHibernate = true;
}
}
-#else // COMPILE_HALBACKEND
+#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
canFreeze = rootDevice->canFreeze();
diff --git a/r14-xdg-update b/r14-xdg-update
index 1195240d4..8bf357fff 100644
--- a/r14-xdg-update
+++ b/r14-xdg-update
@@ -3,7 +3,7 @@
# A script to perform R14.0.0 XDG compliance updates.
SCRIPT_NAME="`basename \`readlink -f $0\``"
-SCRIPT_VERSION=201407050
+SCRIPT_VERSION=201410170
# This script should be needed to run only once, but corner cases
# and file/directory permissions could cause incomplete updates.
@@ -608,6 +608,14 @@ if [ "$R14_VERSION" -lt "201310050" ]; then
fi
fi
+# Update TDENewStuff
+if [ "$R14_VERSION" -lt "201410170" ]; then
+ Log "Updating TDENewStuff providers and status."
+ find "$PROFILE_DIR"/share/config -type f -print0 2>/dev/null | \
+ xargs -r0 grep -ZIEl "^\[KNewStuff" | \
+ xargs -r0 sed -i -e "/^\[KNewStuff/,/^\[|$/{" -e "s|^\[KNewStuff|[TDENewStuff|" -e "s|^ProvidersUrl=[^ ]*|ProvidersUrl=https://www.trinitydesktop.org/ocs/providers.xml|" -e "}"
+fi
+
Log "Renaming some configuration files and directories."
# Note: The only rebranding that occured before starting the R14 branch was krita. All other
# rebranding updates belong in this script.
diff --git a/tdeioslave/ConfigureChecks.cmake b/tdeioslave/ConfigureChecks.cmake
index 8f0783133..eed370833 100644
--- a/tdeioslave/ConfigureChecks.cmake
+++ b/tdeioslave/ConfigureChecks.cmake
@@ -11,6 +11,12 @@
if( WITH_SASL )
check_include_file( "sasl/sasl.h" HAVE_SASL_SASL_H )
+ if( NOT HAVE_SASL_SASL_H )
+ find_path( SASL_H_PATH "sasl/sasl.h" )
+ if( SASL_H_PATH )
+ set( HAVE_SASL_SASL_H "1" )
+ endif( )
+ endif( )
check_library_exists( sasl2 sasl_client_init "" HAVE_LIBSASL2 )
if( HAVE_SASL_SASL_H AND HAVE_LIBSASL2 )
set( SASL_LIBRARIES sasl2 )
diff --git a/tdeioslave/man/man2html.cpp b/tdeioslave/man/man2html.cpp
index 67354e1b1..eee3ac803 100644
--- a/tdeioslave/man/man2html.cpp
+++ b/tdeioslave/man/man2html.cpp
@@ -2707,6 +2707,7 @@ static const char *section_list[] = {
"3L", "Lightweight Processes Library",
"3M", "Mathematical Library",
"3N", "Network Functions",
+ "3p", "Perl Functions",
"3R", "RPC Services Library",
"3S", "Standard I/O Functions",
"3V", "C Library Functions",
@@ -5482,16 +5483,17 @@ static char *scan_troff_mandoc(char *c, bool san, char **result)
end++;
}
- if (end > c + 2
+ if (end >= c + 2
&& ispunct(*(end - 1))
&& isspace(*(end - 2)) && *(end - 2) != '\n') {
/* Don't format lonely punctuation E.g. in "xyz ," format
* the xyz and then append the comma removing the space.
*/
- *(end - 2) = '\n';
- ret = scan_troff(c, san, result);
- *(end - 2) = *(end - 1);
- *(end - 1) = ' ';
+ *(end - 2) = 0;
+ (void)scan_troff(c, 0, result);
+ ret = end-2;
+ *(end-2)=*(end-1);
+ *(end-1)=' ';
}
else {
ret = scan_troff(c, san, result);
diff --git a/tdeioslave/media/mediamanager/CMakeLists.txt b/tdeioslave/media/mediamanager/CMakeLists.txt
index 5a73f3708..21faaeaf7 100644
--- a/tdeioslave/media/mediamanager/CMakeLists.txt
+++ b/tdeioslave/media/mediamanager/CMakeLists.txt
@@ -36,30 +36,21 @@ install( FILES mediamanager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
set( target kded_mediamanager )
if( WITH_HAL )
- set( ${target}_SRCS
- mediamanager.cpp mediamanager.skel medialist.cpp
- backendbase.cpp fstabbackend.cpp removablebackend.cpp
- mediadirnotify.cpp mediadirnotify.skel
- decryptdialog.ui dialog.cpp
- halbackend.cpp linuxcdpolling.cpp tdehardwarebackend.cpp
- )
+ set( HAL_MEDIA_BACKEND halbackend.cpp linuxcdpolling.cpp )
+ set( HAL_MEDIA_LIBRARIES ${HAL_LIBRARIES} -lhal-storage ${DBUS_TQT_LIBRARIES} )
+endif( )
- tde_add_kpart( ${target} AUTOMOC
- SOURCES ${${target}_SRCS}
- LINK mediacommon-static tdeinit_kded-shared ${HAL_LIBRARIES} -lhal-storage ${DBUS_TQT_LIBRARIES}
- DESTINATION ${PLUGIN_INSTALL_DIR}
- )
-else( )
- set( ${target}_SRCS
+if( WITH_TDEHWLIB )
+ set( TDEHWBACKEND tdehardwarebackend.cpp )
+endif( WITH_TDEHWLIB )
+
+tde_add_kpart( ${target} AUTOMOC
+ SOURCES
mediamanager.cpp mediamanager.skel medialist.cpp
backendbase.cpp fstabbackend.cpp removablebackend.cpp
decryptdialog.ui dialog.cpp
- mediadirnotify.cpp mediadirnotify.skel tdehardwarebackend.cpp
- )
-
- tde_add_kpart( ${target} AUTOMOC
- SOURCES ${${target}_SRCS}
- LINK mediacommon-static tdeinit_kded-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
- )
-endif( )
+ mediadirnotify.cpp mediadirnotify.skel
+ ${HAL_MEDIA_BACKEND} ${TDEHWBACKEND}
+ LINK mediacommon-static tdeinit_kded-shared ${HAL_MEDIA_LIBRARIES}
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/tdeioslave/media/medianotifier/medianotifier.cpp b/tdeioslave/media/medianotifier/medianotifier.cpp
index 2db917b25..4de36cad8 100644
--- a/tdeioslave/media/medianotifier/medianotifier.cpp
+++ b/tdeioslave/media/medianotifier/medianotifier.cpp
@@ -19,7 +19,13 @@
#include "medianotifier.h"
+#ifdef __OpenBSD__
+#include <sys/statvfs.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+#else
#include <sys/vfs.h>
+#endif
#include <tqfile.h>
#include <tqfileinfo.h>
diff --git a/tdeioslave/media/medianotifier/notificationdialog.cpp b/tdeioslave/media/medianotifier/notificationdialog.cpp
index c9a920f99..7e4004e8c 100644
--- a/tdeioslave/media/medianotifier/notificationdialog.cpp
+++ b/tdeioslave/media/medianotifier/notificationdialog.cpp
@@ -28,7 +28,9 @@
#include <tqlabel.h>
#include <tqcheckbox.h>
#include <tqpushbutton.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include "actionlistboxitem.h"
#include "notificationdialogview.h"
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
index 5357bc68d..3f0319f9f 100644
--- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
+++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
@@ -33,7 +33,9 @@
#include <kprocess.h>
#include <tdestartupinfo.h>
#include <kmimetype.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#endif
#include "dialog.h"
#include "tdeio_media_mounthelper.h"
@@ -187,6 +189,7 @@ MountHelper::MountHelper() : TDEApplication()
void MountHelper::invokeEject(const TQString &device, bool quiet)
{
+#ifdef __TDE_HAVE_TDEHWLIB
// Try TDE HW library eject first...
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device);
@@ -197,6 +200,7 @@ void MountHelper::invokeEject(const TQString &device, bool quiet)
::exit(0);
}
}
+#endif
// Then fall back to tdeeject if needed
TDEProcess *proc = new TDEProcess(TQT_TQOBJECT(this));
diff --git a/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp b/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp
index dc46e8287..61c5ccbbd 100644
--- a/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp
+++ b/tdeioslave/media/tdefile-plugin/tdefilemediaplugin.cpp
@@ -33,6 +33,9 @@
#ifdef HAVE_STATVFS
# include <sys/statvfs.h>
#else
+# ifdef __OpenBSD__
+# include <sys/param.h>
+# endif
# include <sys/mount.h>
# define statvfs statfs
# define f_frsize f_bsize
diff --git a/tdesu/tdesud/tdesud.cpp b/tdesu/tdesud/tdesud.cpp
index 5e4f5122a..3d64bc840 100644
--- a/tdesu/tdesud/tdesud.cpp
+++ b/tdesu/tdesud/tdesud.cpp
@@ -45,7 +45,9 @@
#include <pwd.h>
#include <errno.h>
+#ifndef __OpenBSD__
#include <sys/prctl.h>
+#endif
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -249,7 +251,9 @@ int create_socket()
int main(int argc, char *argv[])
{
+#ifndef __OpenBSD__
prctl(PR_SET_DUMPABLE, 0);
+#endif
TDEAboutData aboutData("tdesud", I18N_NOOP("TDE su daemon"),
Version, I18N_NOOP("Daemon used by tdesu"),
diff --git a/tdm/ConfigureChecks.cmake b/tdm/ConfigureChecks.cmake
index ae7ea8b6c..cb333aa61 100644
--- a/tdm/ConfigureChecks.cmake
+++ b/tdm/ConfigureChecks.cmake
@@ -27,16 +27,6 @@ check_function_exists( login_getclass HAVE_LOGIN_GETCLASS )
check_function_exists( auth_timeok HAVE_AUTH_TIMEOK )
tde_restore( CMAKE_REQUIRED_LIBRARIES )
-check_function_exists( crypt LIBC_HAVE_CRYPT )
-if( LIBC_HAVE_CRYPT )
- set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE )
-else( )
- check_library_exists( crypt crypt "" HAVE_CRYPT )
- if( HAVE_CRYPT )
- set( CRYPT_LIBRARY crypt )
- endif( )
-endif( )
-
check_include_file( lastlog.h HAVE_LASTLOG_H )
check_include_file( termio.h HAVE_TERMIO_H )
@@ -95,7 +85,7 @@ unset( BSD_UTMP )
if( NOT HAVE_UTMPX )
check_function_exists( getutent have_getutent )
if( NOT have_getutent )
- set( BSD_UTMP 1 )
+ set( BSD_UTMP 1 CACHE INTERNAL "" FORCE )
endif( )
endif( )
diff --git a/tdm/backend/auth.c b/tdm/backend/auth.c
index bd183142c..b92881789 100644
--- a/tdm/backend/auth.c
+++ b/tdm/backend/auth.c
@@ -41,6 +41,9 @@ from the copyright holder.
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
+#ifdef __OpenBSD__
+#include <pwd.h>
+#endif
#include <sys/ioctl.h>
@@ -290,6 +293,26 @@ SaveServerAuthorizations( struct display *d, Xauth **auths, int count )
return FALSE;
}
}
+#ifdef __OpenBSD__
+ {
+ struct passwd *x11;
+ uid_t uid;
+ gid_t gid;
+ /* Give read capability to group _x11 */
+ x11 = getpwnam("_x11");
+ if (x11 == NULL) {
+ LogError("Can't find _x11 user\n");
+ uid = getuid();
+ gid = getgid();
+ } else {
+ uid = x11->pw_uid;
+ gid = x11->pw_gid;
+ }
+
+ fchown(fileno(auth_file), uid, gid);
+ }
+#endif
+
Debug( "file: %s auth: %p\n", d->authFile, auths );
for (i = 0; i < count; i++) {
/*
diff --git a/tdm/backend/getfd.c b/tdm/backend/getfd.c
index 6bf8c8783..307b2501c 100644
--- a/tdm/backend/getfd.c
+++ b/tdm/backend/getfd.c
@@ -22,8 +22,12 @@ is_a_console(int fd) {
char arg;
arg = 0;
+#ifdef __OpenBSD__
+ return arg;
+#else
return (ioctl(fd, KDGKBTYPE, &arg) == 0
&& ((arg == KB_101) || (arg == KB_84)));
+#endif
}
static int
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp
index f172521bc..2d630485e 100644
--- a/tdm/kfrontend/kgapp.cpp
+++ b/tdm/kfrontend/kgapp.cpp
@@ -123,11 +123,14 @@ void GreeterApp::init()
startTimer( pingInterval * 60000 );
}
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+#endif
}
void GreeterApp::deviceChanged(TDEGenericDevice* device) {
+#ifdef __TDE_HAVE_TDEHWLIB
#ifdef WITH_XRANDR
if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI();
@@ -135,6 +138,7 @@ void GreeterApp::deviceChanged(TDEGenericDevice* device) {
delete randrsimple;
}
#endif // WITH_XRANDR
+#endif // __TDE_HAVE_TDEHWLIB
}
void
diff --git a/tdm/kfrontend/kgapp.h b/tdm/kfrontend/kgapp.h
index 6150b4f5d..c9e2802c1 100644
--- a/tdm/kfrontend/kgapp.h
+++ b/tdm/kfrontend/kgapp.h
@@ -27,7 +27,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define KGAPP_H
#include <tdeapplication.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#else
+#define TDEGenericDevice void
+#endif
class GreeterApp : public TDEApplication {
Q_OBJECT
diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp
index 5ff8d5516..e6073da50 100644
--- a/tdm/kfrontend/kgreeter.cpp
+++ b/tdm/kfrontend/kgreeter.cpp
@@ -71,7 +71,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <fcntl.h>
#include <sys/types.h>
#include <utmp.h>
+#ifdef HAVE_UTMPX
#include <utmpx.h>
+#endif
#include <stdio.h>
#include <string.h>
@@ -1294,13 +1296,14 @@ void ControlPipeHandlerObject::run(void) {
umask(0);
struct stat buffer;
int status;
- char *fifo_parent_dir = strdup(FIFO_DIR);
- dirname(fifo_parent_dir);
+ char *fifo_parent_dir;
+ char *fifo_dir = strdup(FIFO_DIR);
+ fifo_parent_dir = dirname(fifo_dir);
status = stat(fifo_parent_dir, &buffer);
if (status != 0) {
- mkdir(fifo_parent_dir, 0644);
+ mkdir(fifo_parent_dir, 0755);
}
- free(fifo_parent_dir);
+ free(fifo_dir);
status = stat(FIFO_DIR, &buffer);
if (status == 0) {
int file_mode = ((buffer.st_mode & S_IRWXU) >> 6) * 100;
@@ -1313,7 +1316,7 @@ void ControlPipeHandlerObject::run(void) {
return;
}
}
- mkdir(FIFO_DIR,0600);
+ mkdir(FIFO_DIR,0700);
mknod(mPipeFilename.ascii(), S_IFIFO|0600, 0);
chmod(mPipeFilename.ascii(), 0600);
diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h
index 8a7bae6d5..fbdf49a89 100644
--- a/twin/compton-tde/common.h
+++ b/twin/compton-tde/common.h
@@ -389,9 +389,11 @@ typedef void (*f_CopySubBuffer) (Display *dpy, GLXDrawable drawable, int x, int
#ifdef CONFIG_GLX_SYNC
// Looks like duplicate typedef of the same type is safe?
+#ifndef __OpenBSD__
typedef int64_t GLint64;
typedef uint64_t GLuint64;
typedef struct __GLsync *GLsync;
+#endif
#ifndef GL_SYNC_FLUSH_COMMANDS_BIT
#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001