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>2000-11-13 07:06:41 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-13 07:06:41 +0300
commit70a11195b9bf3617e3dbe4b9de034b3792c65621 (patch)
tree3d65dd15dc384556623d9735b5f56d7811701ff5 /winsup/cygwin
parent49421cd9c5d29b29b4da341a75855b00fbab9b3d (diff)
* path.cc (get_device_number): Allow /dev/ttySn to designate a com port.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/automode.c2
-rw-r--r--winsup/cygwin/exceptions.cc4
-rw-r--r--winsup/cygwin/fhandler.h2
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc2
-rw-r--r--winsup/cygwin/path.cc4
6 files changed, 13 insertions, 6 deletions
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 <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.
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;
}