Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-04-19 01:10:15 +0400
committerChristopher Faylor <me@cgf.cx>2001-04-19 01:10:15 +0400
commit0381fec68f46471d29d3b87c5361e05fcdeb2cd5 (patch)
tree718cfaf2d3d8734c48f8957892329c0e8fc2fbfc /winsup/cygwin/termios.cc
parenta2d47fe9d983ec85075172211172af9e5ab4054f (diff)
Throughout, change fdtab references to cygheap->fdtab.
* child_info.h (cygheap_exec_info): Eliminate special fdtab stuff. * spawn.cc (spawn_guts): Ditto. * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate. * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap. (_cmalloc_entry): Include fdtab here. * dtable.h (dtable): Declare/define new methods. * dtable.cc (dtable::vfork_child_fixup): New method. (dtable::fixup_after_exec): Remove unneeded extra arguments. * dcrt0.cc (dll_crt0_1): Ditto. * environ.cc (getwinenv): Use case sensitive comparison. (winenv): Make a copy of environment cache to avoid realloc problems when duplicate environment variables exist in the environment. (From Egor Duda) * net.cc (cygwin_socket): Revert Apr 14 change. * include/sys/file.h: Protect against previous X_OK definition. * passwd.cc: Eliminate passwd_sem throughout. * security.cc: Ditto. * cygwin.din: Export New functions. * passwd.cc (read_etc_passwd): Make race safe. (getpwuid_r): New function. (getpwnam_r): New function.
Diffstat (limited to 'winsup/cygwin/termios.cc')
-rw-r--r--winsup/cygwin/termios.cc39
1 files changed, 20 insertions, 19 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index b1fd12aa8..63c483bf0 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
@@ -17,6 +17,7 @@ details. */
#include "cygerrno.h"
#include "fhandler.h"
#include "dtable.h"
+#include "cygheap.h"
#include <cygwin/version.h>
#include "perprocess.h"
#include <sys/termios.h>
@@ -27,14 +28,14 @@ tcsendbreak (int fd, int duration)
{
int res = -1;
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
fhandler_base *fh;
- fh = fdtab[fd];
+ fh = cygheap->fdtab[fd];
if (!fh->is_tty ())
set_errno (ENOTTY);
@@ -57,14 +58,14 @@ tcdrain (int fd)
termios_printf ("tcdrain");
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
fhandler_base *fh;
- fh = fdtab[fd];
+ fh = cygheap->fdtab[fd];
if (!fh->is_tty ())
set_errno (ENOTTY);
@@ -85,14 +86,14 @@ tcflush (int fd, int queue)
{
int res = -1;
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
fhandler_base *fh;
- fh = fdtab[fd];
+ fh = cygheap->fdtab[fd];
if (!fh->is_tty ())
set_errno (ENOTTY);
@@ -113,14 +114,14 @@ tcflow (int fd, int action)
{
int res = -1;
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
fhandler_base *fh;
- fh = fdtab[fd];
+ fh = cygheap->fdtab[fd];
if (!fh->is_tty ())
set_errno (ENOTTY);
@@ -142,14 +143,14 @@ tcsetattr (int fd, int a, const struct termios *t)
int res = -1;
t = __tonew_termios (t);
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
fhandler_base *fh;
- fh = fdtab[fd];
+ fh = cygheap->fdtab[fd];
if (!fh->is_tty ())
set_errno (ENOTTY);
@@ -174,13 +175,13 @@ tcgetattr (int fd, struct termios *in_t)
int res = -1;
struct termios *t = __makenew_termios (in_t);
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
+ else if (!cygheap->fdtab[fd]->is_tty ())
set_errno (ENOTTY);
else
{
- if ((res = fdtab[fd]->tcgetattr (t)) == 0)
+ if ((res = cygheap->fdtab[fd]->tcgetattr (t)) == 0)
(void) __toapp_termios (in_t, t);
}
@@ -200,12 +201,12 @@ tcgetpgrp (int fd)
{
int res = -1;
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
+ else if (!cygheap->fdtab[fd]->is_tty ())
set_errno (ENOTTY);
else
- res = fdtab[fd]->tcgetpgrp ();
+ res = cygheap->fdtab[fd]->tcgetpgrp ();
termios_printf ("%d = tcgetpgrp (%d)", res, fd);
return res;
@@ -217,12 +218,12 @@ tcsetpgrp (int fd, pid_t pgid)
{
int res = -1;
- if (fdtab.not_open (fd))
+ if (cygheap->fdtab.not_open (fd))
set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
+ else if (!cygheap->fdtab[fd]->is_tty ())
set_errno (ENOTTY);
else
- res = fdtab[fd]->tcsetpgrp (pgid);
+ res = cygheap->fdtab[fd]->tcsetpgrp (pgid);
termios_printf ("%d = tcsetpgrp (%d, %x)", res, fd, pgid);
return res;