Skip to content

Commit df56940

Browse files
author
jef
committed
quick fix to get grass shell built on mac
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10668 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0e6cca3 commit df56940

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/plugins/grass/qtermwidget/k3process.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,10 @@ bool K3Process::closeStderr()
636636
bool K3Process::closePty()
637637
{
638638
if (d->pty && d->pty->masterFd() >= 0) {
639+
#ifndef Q_OS_MAC
639640
if (d->addUtmp)
640641
d->pty->logout();
642+
#endif
641643
d->pty->close();
642644
return true;
643645
} else
@@ -948,8 +950,10 @@ int K3Process::commSetupDoneC()
948950
// PTY stuff //
949951
if (d->usePty) {
950952
d->pty->setCTty();
953+
#ifndef Q_OS_MAC
951954
if (d->addUtmp)
952955
d->pty->login(getenv("USER"), getenv("DISPLAY"));
956+
#endif
953957
}
954958

955959
return ok;

src/plugins/grass/qtermwidget/kpty.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ void KPty::setCTty()
417417
#endif
418418
}
419419

420+
#ifndef Q_OS_MAC
420421
void KPty::login(const char *user, const char *remotehost)
421422
{
422423
#ifdef HAVE_UTEMPTER
@@ -561,6 +562,7 @@ void KPty::logout()
561562
# endif
562563
#endif
563564
}
565+
#endif
564566

565567
// XXX Supposedly, tc[gs]etattr do not work with the master on Solaris.
566568
// Please verify.

src/plugins/grass/qtermwidget/kpty.h

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class KPty {
8282
*/
8383
void setCTty();
8484

85+
#ifndef Q_OS_MAC
8586
/**
8687
* Creates an utmp entry for the tty.
8788
* This function must be called after calling setCTty and
@@ -98,6 +99,7 @@ class KPty {
9899
* Removes the utmp entry for this tty.
99100
*/
100101
void logout();
102+
#endif
101103

102104
/**
103105
* Wrapper around tcgetattr(3).

0 commit comments

Comments
 (0)