Index: src/w32.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32.c,v retrieving revision 1.90 diff -u -r1.90 w32.c --- src/w32.c 15 Feb 2005 23:19:26 -0000 1.90 +++ src/w32.c 29 Mar 2005 13:49:57 -0000 @@ -74,6 +74,11 @@ #endif #include +#include +#ifdef _MBCS /* MBCS is not supported on Mingw32 */ +#define _tcspbrk _mbspbrk +#endif + #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */ #include #undef socket @@ -713,7 +718,7 @@ int len = 0; /* must be valid filename, no wild cards or other invalid characters */ - if (strpbrk (name, "*?|<>\"")) + if (_tcspbrk (name, "*?|<>\"")) return 0; dir_handle = FindFirstFile (name, &find_data); @@ -788,7 +793,7 @@ if (!IS_DIRECTORY_SEP (ptr[0]) || !IS_DIRECTORY_SEP (ptr[1]) || !ptr[2]) return 0; - if (strpbrk (ptr + 2, "*?|<>\"\\/")) + if (_tcspbrk (ptr + 2, "*?|<>\"\\/")) return 0; return 1; @@ -2311,7 +2316,7 @@ name = (char *) map_w32_filename (path, &path); /* must be valid filename, no wild cards or other invalid characters */ - if (strpbrk (name, "*?|<>\"")) + if (_tcspbrk (name, "*?|<>\"")) { errno = ENOENT; return -1;