From 70a11195b9bf3617e3dbe4b9de034b3792c65621 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 13 Nov 2000 04:06:41 +0000 Subject: * path.cc (get_device_number): Allow /dev/ttySn to designate a com port. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/automode.c | 2 +- winsup/cygwin/exceptions.cc | 4 ++-- winsup/cygwin/fhandler.h | 2 -- winsup/cygwin/lib/_cygwin_crt0_common.cc | 2 +- winsup/cygwin/path.cc | 4 ++++ 6 files changed, 13 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 407b7f816..8e137c9dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 12 23:01:35 2000 Christopher Faylor + + * path.cc (get_device_number): Allow /dev/ttySn to designate a com + port. + Sat Nov 11 23:55:19 2000 Christopher Faylor * path.h: Add __attribute__ ((regparm(x))) to commonly used functions. diff --git a/winsup/cygwin/automode.c b/winsup/cygwin/automode.c index 4e9be219a..e02b0b9de 100644 --- a/winsup/cygwin/automode.c +++ b/winsup/cygwin/automode.c @@ -16,7 +16,7 @@ extern int _fmode; void cygwin_premain0 (int argc, char **argv) { - static struct __cygwin_perfile pf[] = + static struct __cygwin_perfile pf[] = { {"", O_RDONLY | O_TEXT}, {"", O_WRONLY | O_BINARY}, diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index fcdf7c44e..e5c72c04c 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -557,7 +557,7 @@ stack (void) int __stdcall handle_sigsuspend (sigset_t tempmask) { - sigframe thisframe (mainthread); + sigframe thisframe (mainthread); sigset_t oldmask = myself->getsigmask (); // Remember for restoration set_process_mask (tempmask & ~SIG_NONMASKABLE);// Let signals we're @@ -861,7 +861,7 @@ ctrl_c_handler (DWORD type) extern "C" void __stdcall set_process_mask (sigset_t newmask) { - sigframe thisframe (mainthread); + sigframe thisframe (mainthread); mask_sync->acquire (INFINITE); sigset_t oldmask = myself->getsigmask (); newmask &= ~SIG_NONMASKABLE; diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 336b7a8ec..9010a17a5 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -902,8 +902,6 @@ public: int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms); }; -uid_t __stdcall get_file_owner (int, const char *); -gid_t __stdcall get_file_group (int, const char *); int __stdcall set_console_state_for_spawn (); #endif /* _FHANDLER_H_ */ diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc index dd9554d29..978fcae33 100644 --- a/winsup/cygwin/lib/_cygwin_crt0_common.cc +++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc @@ -65,7 +65,7 @@ _cygwin_crt0_common (MainFunc f, per_process *u) _impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */ else u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */ - + u->forkee = 0; /* This should only be set in dcrt0.cc when the process is actually forked */ u->main = f; diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 34a2b983b..1b487ceca 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -534,6 +534,8 @@ get_device_number (const char *name, int &unit, BOOL from_conv) } else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0) devn = FH_SERIAL; + else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0) + devn = FH_SERIAL; else if (deveq ("pipe") || deveq ("piper") || deveq ("pipew")) devn = FH_PIPE; else if (deveq ("tcp") || deveq ("udp") || deveq ("streamsocket") @@ -547,6 +549,8 @@ get_device_number (const char *name, int &unit, BOOL from_conv) } else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0) devn = FH_SERIAL; + else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0) + devn = FH_SERIAL; return devn; } -- cgit v1.2.3