summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-03-26 20:02:01 +0000
committerChristopher Faylor <me@cgf.cx>2004-03-26 20:02:01 +0000
commit11a9a1cfbd9eb8f1c3670a253c561915af168407 (patch)
tree08916a8b1bfe902f704f2bff5ab2bac93bdecd45 /winsup/cygwin/path.cc
parent6b0d86c56d6082cdc5c403d063530a1114b9bda1 (diff)
downloadcygnal-11a9a1cfbd9eb8f1c3670a253c561915af168407.tar.gz
cygnal-11a9a1cfbd9eb8f1c3670a253c561915af168407.tar.bz2
cygnal-11a9a1cfbd9eb8f1c3670a253c561915af168407.zip
* path.cc (path_conv::check): Use 'strchr' rather than 'strrchr' to find end of
string, for efficiency. * include/cygwin/_types.h: New file. * include/sys/lock.h: Ditto. * include/sys/stdio.h: Ditto. * thread.cc: Include sys/lock.h (__cygwin_lock_init): New function. (__cygwin_lock_init_recursive): Ditto. (__cygwin_lock_fini): Ditto. (__cygwin_lock_lock): Ditto. (__cygwin_lock_trylock): Ditto. (__cygwin_lock_unlock): Ditto. (pthread::atforkprepare): Lock file pointer before fork. (pthread::atforkparent): Unlock file pointer after fork. (pthread::atforkchild): Ditto.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 96fa0628c..7ed2ee778 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -495,7 +495,7 @@ path_conv::check (const char *src, unsigned opt,
MALLOC_CHECK;
assert (src);
- char *p = strrchr (src, '\0');
+ char *p = strchr (src, '\0');
/* Detect if the user was looking for a directory. We have to strip the
trailing slash initially and add it back on at the end due to Windows
brain damage. */