mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 476709 - MacOSX PTY: Fix terminal change_window_size
Change-Id: I89b8c26f65671eaca20a0a5affb20c565f557419 Signed-off-by: Martin Oberhuber <martin.oberhuber@windriver.com>
This commit is contained in:
parent
d334be2c61
commit
6a17a26b22
6 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Copyright (c) 2002, 2009 QNX Software Systems and others.
|
# Copyright (c) 2002, 2015 QNX Software Systems and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -8,12 +8,13 @@
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# QNX Software Systems - initial API and implementation
|
# QNX Software Systems - initial API and implementation
|
||||||
# Alex Blewitt - MacOSX with a 64-bit vm
|
# Alex Blewitt - MacOSX with a 64-bit vm
|
||||||
|
# Martin Oberhuber (Wind River) - Bug 476709 - Fix change_window_size()
|
||||||
#*******************************************************************************/
|
#*******************************************************************************/
|
||||||
|
|
||||||
# makefile for libspawner.so
|
# makefile for libspawner.so
|
||||||
# See http://developer.apple.com/documentation/Java/Conceptual/Java141Development/Core_APIs/chapter_6_section_4.html
|
# See http://developer.apple.com/documentation/Java/Conceptual/Java141Development/Core_APIs/chapter_6_section_4.html
|
||||||
|
|
||||||
JAVA_HOME = $(shell echo /Library/Java/JavaVirtualMachines/jdk1.8.0_*.jdk/Contents/Home)
|
JAVA_HOME = $(shell echo /Library/Java/JavaVirtualMachines/jdk1.[78].0_*.jdk/Contents/Home)
|
||||||
|
|
||||||
# Defaults which can be overridden.
|
# Defaults which can be overridden.
|
||||||
OS = macosx
|
OS = macosx
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2009 QNX Software Systems and others.
|
* Copyright (c) 2002, 2015 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,10 +7,13 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - initial API and implementation
|
* QNX Software Systems - initial API and implementation
|
||||||
|
* Martin Oberhuber (Wind River) - Bug 476709 - Fix change_window_size()
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#include "PTY.h"
|
#include "PTY.h"
|
||||||
#include "openpty.h"
|
#include "openpty.h"
|
||||||
|
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_eclipse_cdt_utils_pty_PTY
|
* Class: org_eclipse_cdt_utils_pty_PTY
|
||||||
* Method: forkpty
|
* Method: forkpty
|
||||||
|
@ -52,7 +55,7 @@ Java_org_eclipse_cdt_utils_pty_PTY_openMaster (JNIEnv *env, jobject jobj, jboole
|
||||||
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
|
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
|
||||||
(JNIEnv *env, jobject jobj, jint fdm, jint width, jint height)
|
(JNIEnv *env, jobject jobj, jint fdm, jint width, jint height)
|
||||||
{
|
{
|
||||||
#ifdef TIOCGWINSZ
|
#ifdef TIOCSWINSZ
|
||||||
struct winsize win;
|
struct winsize win;
|
||||||
|
|
||||||
win.ws_col = width;
|
win.ws_col = width;
|
||||||
|
@ -62,6 +65,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
|
||||||
|
|
||||||
return ioctl(fdm, TIOCSWINSZ, &win);
|
return ioctl(fdm, TIOCSWINSZ, &win);
|
||||||
#else
|
#else
|
||||||
|
#error no TIOCSWINSZ
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib
Normal file → Executable file
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib
Normal file → Executable file
Binary file not shown.
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib
Normal file → Executable file
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib
Normal file → Executable file
Binary file not shown.
Loading…
Add table
Reference in a new issue