/* The basename() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.  */
static char* Curl_basename(char *path)
/* The basename() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.  */
static char* Curl_basename(char *path)
{
  char *s1;
  char *s2;
  s1 = strrchr(path, '/');
  s2 = strrchr(path, '\\');
  if(s1 && s2) {
    path = (s1 > s2? s1 : s2) + 1;
  }
  else if(s1)
    path = s1 + 1;
  else if(s2)
    path = s2 + 1;
  return path;
}