Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2017-02-04 23:09:01 +0000
committerGerrit Code Review @ Eclipse.org2017-02-06 02:16:48 +0000
commitbd5cec12a8c0bb11a801a4336371fd2d888a1783 (patch)
tree83beac63212b042fb438b0244532aeb357067d37 /core/org.eclipse.cdt.core.aix/library/openpty.c
parent01236146d13d0d38d6b38286124e93c63fddf4e5 (diff)
downloadorg.eclipse.cdt-bd5cec12a8c0bb11a801a4336371fd2d888a1783.tar.gz
org.eclipse.cdt-bd5cec12a8c0bb11a801a4336371fd2d888a1783.tar.xz
org.eclipse.cdt-bd5cec12a8c0bb11a801a4336371fd2d888a1783.zip
Remove AIX support
Eclipse 4.7 removed AIX support so CDT should also remove it. Change-Id: I9ed50a4c47e7b861eb2adeb86e857d2a78b4834b Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'core/org.eclipse.cdt.core.aix/library/openpty.c')
-rw-r--r--core/org.eclipse.cdt.core.aix/library/openpty.c134
1 files changed, 0 insertions, 134 deletions
diff --git a/core/org.eclipse.cdt.core.aix/library/openpty.c b/core/org.eclipse.cdt.core.aix/library/openpty.c
deleted file mode 100644
index e8af4b8ebed..00000000000
--- a/core/org.eclipse.cdt.core.aix/library/openpty.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * QNX Software Systems
- *******************************************************************************/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <grp.h>
-
-#include <stdlib.h>
-#include <stropts.h>
-
-/**
- * This is taken from R. W. Stevens book.
- * Alain Magloire.
- */
-
-int ptym_open (char *pts_name);
-int ptys_open (int fdm, const char * pts_name);
-void set_noecho(int fd);
-
-int
-openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
-{
- char line[20];
- line[0]=0;
- *amaster = ptym_open(line);
- if (*amaster < 0)
- return -1;
- *aslave = ptys_open(*amaster, line);
- if (*aslave < 0) {
- close(*amaster);
- return -1;
- }
-
- if (name)
- strcpy(name, line);
-#ifndef TCSAFLUSH
-#define TCSAFLUSH TCSETAF
-#endif
- if (termp)
- (void) tcsetattr(*aslave, TCSAFLUSH, termp);
-#ifdef TIOCSWINSZ
- if (winp)
- (void) ioctl(*aslave, TIOCSWINSZ, (char *)winp);
-#endif
- return 0;
-}
-
-void
-set_noecho(int fd)
-{
- struct termios stermios;
- if (tcgetattr(fd, &stermios) < 0) {
- return ;
- }
-
- /* turn off echo */
- stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
- /* Turn off the NL to CR/NL mapping ou output. */
- /*stermios.c_oflag &= ~(ONLCR);*/
-
- stermios.c_iflag |= (IGNCR);
-
- tcsetattr(fd, TCSANOW, &stermios);
-}
-
-int
-ptym_open(char * pts_name)
-{
- int fdm;
- char *ptr;
-
- strcpy(pts_name, "/dev/ptmx");
- fdm = posix_openpt(O_RDWR);
- if (fdm < 0)
- return -1;
- if (grantpt(fdm) < 0) { /* grant access to slave */
- close(fdm);
- return -2;
- }
- if (unlockpt(fdm) < 0) { /* clear slave's lock flag */
- close(fdm);
- return -3;
- }
- ptr = ptsname(fdm);
- if (ptr == NULL) { /* get slave's name */
- close (fdm);
- return -4;
- }
- strcpy(pts_name, ptr); /* return name of slave */
- return fdm; /* return fd of master */
-}
-
-int
-ptys_open(int fdm, char * pts_name)
-{
- int fds;
- /* following should allocate controlling terminal */
- fds = open(pts_name, O_RDWR);
- if (fds < 0) {
- close(fdm);
- return -5;
- }
-/*
- if (ioctl(fds, I_PUSH, "ptem") < 0) {
- printf("pterm:%s\n", strerror(errno));
- close(fdm);
- close(fds);
- return -6;
- }
- if (ioctl(fds, I_PUSH, "ldterm") < 0) {
- printf("ldterm %s\n", strerror(errno));
- close(fdm);
- close(fds);
- return -7;
- }
-*/
- return fds;
-}

Back to the top