On 3/4/2012 3:33 AM, Yaakov (Cygwin/X) wrote:
On Sat, 2012-03-03 at 09:45 +0100, marco atzeri wrote:
I solved the problem noticing the the program was looking on strange
terminals names "ptyp0 ...ptyqf"
Due to a lack of configuration in qterminal 2 variables are not
declared at all,
adding them
./libqterminal/libqterminal.pro:DEFINES += HAVE_PTY_H HAVE_OPENPTY
./qterminal/qterminal.pro:DEFINES += HAVE_PTY_H HAVE_OPENPTY
and after some cleaning to synchronze the code the fault is gone
hope it helps
Care to share your patch? It may be what I need to fix libkpty.
Yaakov
Cygwin Ports
attached
I noticed that there are a lot of versions of
libqterminal/unix/kpty.cpp
around, so you could need to further adjust.
One favor,
now that Qt 4.7.4-3 is in the distro
could you also add libqscintilla2 ?
The new Qt octave-gui depends on it.
For the time being I copied your files on my site,
to simplify the installation of my test users:
http://matzeri.altervista.org/yaakov/
but for the stable solution I will need it in the distro.
Thanks
Marco
diff -x Makefile -uNr
/pub/hg2/octave/gui/qterminal/libqterminal/libqterminal.pro
gui_bk/qterminal/libqterminal/libqterminal.pro
--- /pub/hg2/octave/gui/qterminal/libqterminal/libqterminal.pro 2012-03-03
13:07:54.530560100 +0100
+++ qterminal/libqterminal/libqterminal.pro 2012-03-03 15:08:42.926373100
+0100
@@ -1,6 +1,5 @@
TEMPLATE = lib
VERSION = 0.1.0
-DESTDIR = .
TARGET = qterminal
CONFIG += qt staticlib
@@ -11,6 +10,7 @@
unix {
+DEFINES += HAVE_PTY_H HAVE_OPENPTY
DEFINES += HAVE_POSIX_OPENPT
#or DEFINES += HAVE_GETPT
diff -x Makefile -uNr /pub/hg2/octave/gui/qterminal/libqterminal/unix/kpty.cpp
gui_bk/qterminal/libqterminal/unix/kpty.cpp
--- /pub/hg2/octave/gui/qterminal/libqterminal/unix/kpty.cpp 2012-03-03
13:07:54.572562500 +0100
+++ qterminal/libqterminal/unix/kpty.cpp 2012-03-03 13:41:33.332257400
+0100
@@ -161,12 +161,14 @@
{
}
+#ifndef HAVE_OPENPTY
bool KPtyPrivate::chownpty(bool)
{
// return !QProcess::execute(KStandardDirs::findExe("kgrantpty"),
// QStringList() << (grant?"--grant":"--revoke") <<
QString::number(masterFd));
return true;
}
+#endif
/////////////////////////////
// public member functions //
@@ -220,7 +222,7 @@
{
d->masterFd = -1;
d->slaveFd = -1;
- qWarning(175) << "Can't open a pseudo teletype";
+ qWarning() << "Can't open a pseudo teletype";
return false;
}
d->ttyName = ptsn;
@@ -391,6 +393,8 @@
if (d->masterFd < 0)
return;
closeSlave();
+ if (d->ownMaster) {
+#ifndef HAVE_OPENPTY
// don't bother resetting unix98 pty, it will go away after closing master
anyway.
if (memcmp(d->ttyName.data(), "/dev/pts/", 9)) {
if (!geteuid()) {
@@ -405,7 +409,9 @@
d->chownpty(false);
}
}
+#endif
::close(d->masterFd);
+ }
d->masterFd = -1;
}
diff -x Makefile -uNr /pub/hg2/octave/gui/qterminal/qterminal/qterminal.pro
gui_bk/qterminal/qterminal/qterminal.pro
--- /pub/hg2/octave/gui/qterminal/qterminal/qterminal.pro 2012-03-03
13:07:54.595563800 +0100
+++ qterminal/qterminal/qterminal.pro 2012-03-03 15:09:24.168732000 +0100
@@ -1,5 +1,4 @@
TEMPLATE = app
-DESTDIR = .
QT += core gui
@@ -12,4 +11,5 @@
-lqterminal -luser32 -lkernel32
} else {
LIBS += -L../libqterminal -lqterminal -lutil
+ DEFINES += HAVE_PTY_H HAVE_OPENPTY
}
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general