1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: ptytty.c |
2 | * File: ptytty.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * |
4 | * |
5 | * All portions of code are copyright by their respective author/s. |
5 | * All portions of code are copyright by their respective author/s. |
6 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
6 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
|
|
7 | * Copyright (c) 2004 Marc Lehmann <pcg@goof.com> |
7 | * |
8 | * |
8 | * This program is free software; you can redistribute it and/or modify |
9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
10 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or |
11 | * the Free Software Foundation; either version 2 of the License, or |
11 | * (at your option) any later version. |
12 | * (at your option) any later version. |
… | |
… | |
49 | # include <fcntl.h> |
50 | # include <fcntl.h> |
50 | #endif |
51 | #endif |
51 | #ifdef HAVE_SYS_IOCTL_H |
52 | #ifdef HAVE_SYS_IOCTL_H |
52 | # include <sys/ioctl.h> |
53 | # include <sys/ioctl.h> |
53 | #endif |
54 | #endif |
54 | #if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__) |
55 | #if defined(PTYS_ARE_PTMX) && defined(HAVE_SYS_STROPTS_H) |
55 | # include <sys/stropts.h> /* for I_PUSH */ |
56 | # include <sys/stropts.h> /* for I_PUSH */ |
|
|
57 | #endif |
|
|
58 | #ifdef HAVE_ISASTREAM |
|
|
59 | # include <stropts.h> |
56 | #endif |
60 | #endif |
57 | |
61 | |
58 | #ifdef DEBUG_TTY |
62 | #ifdef DEBUG_TTY |
59 | # define D_TTY(x) fprintf x ; fputc('\n', stderr) ; fflush(stderr) |
63 | # define D_TTY(x) fprintf x ; fputc('\n', stderr) ; fflush(stderr) |
60 | #else |
64 | #else |