aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-06 00:09:55 +0000
committerChristopher Faylor <me@cgf.cx>2002-06-06 00:09:55 +0000
commitee964e2f97ca0ca9033b6daf975cada710a46737 (patch)
treec3cbe756486fff12e467b6f55a8263f7380fccc1 /winsup
parent39e65e0113e188e4177077407d337bb3a1ac1853 (diff)
downloadnewlib-ee964e2f97ca0ca9033b6daf975cada710a46737.zip
newlib-ee964e2f97ca0ca9033b6daf975cada710a46737.tar.gz
newlib-ee964e2f97ca0ca9033b6daf975cada710a46737.tar.bz2
* 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')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/cygwin.din36
-rw-r--r--winsup/cygwin/path.cc4
-rw-r--r--winsup/cygwin/times.cc8
4 files changed, 29 insertions, 27 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 958c5d3..45de9f8 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2002-06-05 Christopher Faylor <cgf@redhat.com>
+ * 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().
+
+2002-06-05 Christopher Faylor <cgf@redhat.com>
+
* dir.cc (rmdir): Streamline. Detect attempts to remove directories
from "read-only" virtual devices. (Suggested by Pavel Tsekov)
* syscalls.cc (unlink): Detect attempts to remove directories
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index 709b311..9bbfa5f 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -106,8 +106,8 @@ clearerr
_clearerr = clearerr
clock
_clock = clock
-close
-_close = close
+_close
+close = _close
closedir
_closedir = closedir
copysign
@@ -209,8 +209,8 @@ _fchown = fchown
fchown32
fclose
_fclose = fclose
-fcntl
-_fcntl = fcntl
+_fcntl
+fcntl = _fcntl
fcvt
_fcvt = fcvt
fcvtbuf
@@ -304,8 +304,8 @@ fseek
_fseek = fseek
fsetpos
_fsetpos = fsetpos
-fstat
-_fstat = fstat
+_fstat
+fstat = _fstat
fstat64
fstatfs
_fstatfs = fstatfs
@@ -472,8 +472,8 @@ jn
_jn = jn
jnf
_jnf = jnf
-kill
-_kill = kill
+_kill
+kill = _kill
labs
_labs = labs
lchown
@@ -521,8 +521,8 @@ login
logout
longjmp
_longjmp = longjmp
-lseek
-_lseek = lseek
+_lseek
+lseek = _lseek
lseek64
lstat = cygwin_lstat
_lstat = cygwin_lstat
@@ -630,8 +630,8 @@ remainderf
_remainderf = remainderf
remove
_remove = remove
-rename
-_rename = rename
+_rename
+rename = _rename
rewind
_rewind = rewind
rewinddir
@@ -764,8 +764,8 @@ sscanf
_sscanf = sscanf
_sscanf_r
sscanf_r = _sscanf_r
-stat
-_stat = stat
+_stat
+stat = _stat
stat64
statfs
_statfs = statfs
@@ -868,8 +868,8 @@ tempnam
_tempnam = tempnam
time
_time = time
-times
-_times = times
+_times
+times = _times
timezone
tmpfile
_tmpfile = tmpfile
@@ -930,8 +930,8 @@ vsscanf
_vsscanf = vsscanf
_vsscanf_r
vsscanf_r = _vsscanf_r
-wait
-_wait = wait
+_wait
+wait = _wait
waitpid
_waitpid = waitpid
wait3
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 25412b2..336df5e 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;
}
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 6769b4e..e8a886b 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -46,7 +46,7 @@ __to_clock_t (FILETIME * src, int flag)
/* times: POSIX 4.5.2.1 */
extern "C" clock_t
-times (struct tms * buf)
+_times (struct tms * buf)
{
FILETIME creation_time, exit_time, kernel_time, user_time;
@@ -86,12 +86,6 @@ times (struct tms * buf)
return tc;
}
-extern "C" clock_t
-_times (struct tms * buf)
-{
- return times (buf);
-}
-
/* settimeofday: BSD */
extern "C" int
settimeofday (const struct timeval *tv, const struct timezone *tz)