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>2002-06-06 04:09:55 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-06 04:09:55 +0400
commitee964e2f97ca0ca9033b6daf975cada710a46737 (patch)
treec3cbe756486fff12e467b6f55a8263f7380fccc1 /winsup/cygwin/path.cc
parent39e65e0113e188e4177077407d337bb3a1ac1853 (diff)
* cygwin.din: Eliminate some newlib wrappers.
* path.cc (get_devn): Only consider first 99 potential com devices. (get_device_number): Ditto. * times.cc (_times): Eliminate. (_times): Renamed from times().
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 25412b261..336df5e4e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -916,7 +916,7 @@ get_devn (const char *name, int &unit)
devn = FH_MEM;
unit = 4;
}
- else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
+ else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0 && unit < 100)
devn = FH_SERIAL;
else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0)
{
@@ -1070,7 +1070,7 @@ get_device_number (const char *unix_path, const char *w32_path, int &unit)
if (p)
unix_path = p + 1;
if (udeveqn ("com", 3)
- && (unit = digits (unix_path + 3)) >= 0)
+ && (unit = digits (unix_path + 3)) >= 0 && unit < 100)
devn = FH_SERIAL;
}