From 11a9a1cfbd9eb8f1c3670a253c561915af168407 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 26 Mar 2004 20:02:01 +0000 Subject: * 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. --- winsup/cygwin/path.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/path.cc') 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. */ -- cgit v1.2.3