* 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:
@ -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. */
|
||||
|
Reference in New Issue
Block a user