From 3872e9a41944f7f77cf8eea6970c6f3fd5d8fb43 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 2 Jul 2003 03:16:00 +0000 Subject: * Makefile.in: Remove cygserver stuff. * acconfig.h: Add USE_CYGSERVER define. * config.h.in: Regenerate. * configure.in: Add --enable-server setting. * configure: Regenerate. * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize compilation of cygserver stuff. * fork.cc (fork_child): Ditto. * shm.cc: Ditto. * tty.cc (tty::common_init): Ditto. * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable definitions. * environ.cc: Ditto. * ntea.cc: Ditto. * security.cc: Ditto. * security.h: Ditto. * syscalls.cc (check_posix_perm): Remove externs that were already declared in a header. * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since cygwin should always be _MT_SAFE. --- winsup/cygwin/fhandler_tty.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index cc60235e8..84b862e40 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -507,9 +507,12 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) HANDLE from_master_local, to_master_local; - if (!wincap.has_security () || - cygserver_running == CYGSERVER_UNAVAIL || - !cygserver_attach_tty (&from_master_local, &to_master_local)) + if (!wincap.has_security () +#ifdef USE_CYGSERVER + || cygserver_running == CYGSERVER_UNAVAIL + || !cygserver_attach_tty (&from_master_local, &to_master_local) +#endif +) { termios_printf ("cannot dup handles via server. using old method."); @@ -596,6 +599,7 @@ fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr, if (!from_master_ptr || !to_master_ptr) return 0; +#ifdef USE_CYGSERVER client_request_attach_tty req ((DWORD) get_ttyp ()->master_pid, (HANDLE) get_ttyp ()->from_master, (HANDLE) get_ttyp ()->to_master); @@ -605,6 +609,8 @@ fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr, *from_master_ptr = req.from_master (); *to_master_ptr = req.to_master (); +#endif + return 1; } -- cgit v1.2.3