* path.cc (get_device_number): Allow /dev/ttySn to designate a com port.

This commit is contained in:
Christopher Faylor 2000-11-13 04:06:41 +00:00
parent 49421cd9c5
commit 70a11195b9
6 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
Sun Nov 12 23:01:35 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (get_device_number): Allow /dev/ttySn to designate a com
port.
Sat Nov 11 23:55:19 2000 Christopher Faylor <cgf@cygnus.com>
* path.h: Add __attribute__ ((regparm(x))) to commonly used functions.

View File

@ -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},

View File

@ -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;

View File

@ -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_ */

View File

@ -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;

View File

@ -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;
}