head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.32 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.30 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.28 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.3.0.26 pkgsrc-2025Q2-base:1.3 pkgsrc-2025Q1:1.3.0.24 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.3.0.22 pkgsrc-2024Q4-base:1.3 pkgsrc-2024Q3:1.3.0.20 pkgsrc-2024Q3-base:1.3 pkgsrc-2024Q2:1.3.0.18 pkgsrc-2024Q2-base:1.3 pkgsrc-2024Q1:1.3.0.16 pkgsrc-2024Q1-base:1.3 pkgsrc-2023Q4:1.3.0.14 pkgsrc-2023Q4-base:1.3 pkgsrc-2023Q3:1.3.0.12 pkgsrc-2023Q3-base:1.3 pkgsrc-2023Q2:1.3.0.10 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.3.0.8 pkgsrc-2023Q1-base:1.3 pkgsrc-2022Q4:1.3.0.6 pkgsrc-2022Q4-base:1.3 pkgsrc-2022Q3:1.3.0.4 pkgsrc-2022Q3-base:1.3 pkgsrc-2022Q2:1.3.0.2 pkgsrc-2022Q2-base:1.3 pkgsrc-2022Q1:1.2.0.8 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.6 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.4 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.2 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.1.0.40 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.38 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.36 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.32 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.12 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.34 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.30 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.28 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.26 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.24 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.22 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.20 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.18 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.16 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.14 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.10 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.8 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.6 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.4 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.2 pkgsrc-2016Q2-base:1.1; locks; strict; comment @// @; 1.3 date 2022.05.09.19.44.16; author jperkin; state Exp; branches; next 1.2; commitid D68bHarflwrYVpDD; 1.2 date 2021.03.30.10.58.23; author markd; state Exp; branches; next 1.1; commitid KcHOxLF4zWi92kNC; 1.1 date 2016.05.26.08.29.06; author markd; state Exp; branches; next ; commitid 2BWER2UoFoN4UX7z; desc @@ 1.3 log @kpty: Fixes for non-openpty bitrotted code. @ text @$NetBSD: patch-src_kpty.cpp,v 1.2 2021/03/30 10:58:23 markd Exp $ NetBSD loginx() complains if ut_type not set before calling --- src/kpty.cpp.orig 2022-04-02 10:26:01.000000000 +0000 +++ src/kpty.cpp @@@@ -10,6 +10,7 @@@@ #include "kpty_p.h" +#include #include #include @@@@ -168,7 +169,7 @@@@ KPtyPrivate::~KPtyPrivate() bool KPtyPrivate::chownpty(bool grant) { return !QProcess::execute(QFile::decodeName(CMAKE_INSTALL_PREFIX "/" KDE_INSTALL_LIBEXECDIR_KF "/kgrantpty"), - QStringList() << (grant ? "--grant" : "--revoke") << QString::number(masterFd)); + QStringList() << (grant ? QStringLiteral("--grant") : QStringLiteral("--revoke")) << QString::number(masterFd)); } #endif @@@@ -260,6 +261,7 @@@@ bool KPty::open() } #endif // HAVE_PTSNAME || TIOCGPTN +#if 0 // Linux device names, FIXME: Trouble on other systems? for (const char *s3 = "pqrstuvwxyzabcde"; *s3; s3++) { for (const char *s4 = "0123456789abcdef"; *s4; s4++) { @@@@ -289,8 +291,10 @@@@ bool KPty::open() qCWarning(KPTY_LOG) << "Can't open a pseudo teletype"; return false; +#endif gotpty: +#if 0 QFileInfo info(d->ttyName.data()); if (!info.exists()) { return false; // this just cannot happen ... *cough* Yeah right, I just @@@@ -302,14 +306,15 @@@@ gotpty: && !d->chownpty(true)) { qCWarning(KPTY_LOG) << "chownpty failed for device " << ptyName << "::" << d->ttyName << "\nThis means the communication can be eavesdropped." << endl; } +#endif grantedpt: -#ifdef HAVE_REVOKE +#if HAVE_REVOKE revoke(d->ttyName.data()); #endif -#ifdef HAVE_UNLOCKPT +#if HAVE_UNLOCKPT unlockpt(d->masterFd); #elif defined(TIOCSPTLCK) int flag = 0; @@@@ -502,11 +507,14 @@@@ void KPty::login(const char *user, const #endif #if HAVE_UTMPX - gettimeofday(&l_struct.ut_tv, 0); + gettimeofday(&l_struct.ut_tv, nullptr); #else l_struct.ut_time = time(0); #endif +#if HAVE_STRUCT_UTMP_UT_TYPE + l_struct.ut_type = USER_PROCESS; +#endif #if HAVE_LOGIN #if HAVE_LOGINX ::loginx(&l_struct); @@@@ -514,9 +522,6 @@@@ void KPty::login(const char *user, const ::login(&l_struct); #endif #else -#if HAVE_STRUCT_UTMP_UT_TYPE - l_struct.ut_type = USER_PROCESS; -#endif #if HAVE_STRUCT_UTMP_UT_PID l_struct.ut_pid = getpid(); #if HAVE_STRUCT_UTMP_UT_SESSION @@@@ -605,7 +610,7 @@@@ void KPty::logout() ut->ut_type = DEAD_PROCESS; #endif #if HAVE_UTMPX - gettimeofday(&(ut->ut_tv), 0); + gettimeofday(&(ut->ut_tv), nullptr); pututxline(ut); } endutxent(); @ 1.2 log @kf5: KDE Frameworks update to 5.80.0 10 months of patches/updates. @ text @d1 1 a1 1 $NetBSD: patch-src_kpty.cpp,v 1.1 2016/05/26 08:29:06 markd Exp $ d5 1 a5 1 --- src/kpty.cpp.orig 2021-03-06 16:29:41.000000000 +0000 d7 61 a67 1 @@@@ -496,6 +496,9 @@@@ void KPty::login(const char *user, const d77 1 a77 1 @@@@ -503,9 +506,6 @@@@ void KPty::login(const char *user, const d87 9 @ 1.1 log @Add KDE Frameworks 5.21.0 packages: kbookmarks - Support for bookmarks and the XBEL format kcmutils - Utilities for interacting with KCModules kconfig - Configuration system kcoreaddons - Addons to QtCore kcrash - Support for application crash analysis and bug report from apps kdeclarative - Provides integration of QML and KDE Frameworks kdoctools - Documentation generation from docbook ki18n - Advanced internationalization framework kidletime - Monitoring user activity kio - Resource and network access abstraction kitemmodels - Models for Qt Model/View system knotifications - Abstraction for system notifications knotifyconfig - Configuration system for KNotify kpackage - Installation and loading of additional content as packages kparts - Document centric plugin system kpeople - Provides access to all contacts and aggregates them by person kpty - Pty abstraction kservice - Advanced plugin and service introspection ktexteditor - Advanced embeddable text editor threadweaver - High-level multithreading framework @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- src/kpty.cpp.orig 2016-04-03 21:01:19.000000000 +0000 d7 1 a7 1 @@@@ -538,6 +538,9 @@@@ void KPty::login(const char *user, const d9 1 a9 1 # endif d11 1 a11 1 +# if HAVE_STRUCT_UTMP_UT_TYPE d13 3 a15 3 +# endif # if HAVE_LOGIN # if HAVE_LOGINX d17 1 a17 1 @@@@ -545,9 +548,6 @@@@ void KPty::login(const char *user, const d19 3 a21 3 # endif # else -# if HAVE_STRUCT_UTMP_UT_TYPE d23 2 a24 2 -# endif # if HAVE_STRUCT_UTMP_UT_PID d26 1 a26 1 # if HAVE_STRUCT_UTMP_UT_SESSION @