* 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.
This commit is contained in:
Christopher Faylor
2004-03-26 20:02:01 +00:00
parent 6b0d86c56d
commit 11a9a1cfbd
3 changed files with 69 additions and 1 deletions

View File

@ -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. */