2003-11-11 Robert Collins <rbtcollins@hotmail.com>
Ron Parker <rdparker@butlermfg.com> * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH. * cygheap.h: Ditto. * dcrt0.cc: Ditto. * delqueue.cc: Ditto. * dlfcn.cc: Ditto. * dll_init.cc: Ditto. * dll_init.h: Ditto. * dtable.cc: Ditto. * environ.cc: Ditto. * environ.h: Ditto. * exceptions.cc: Ditto. * external.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_raw.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_virtual.cc: Ditto. * miscfuncs.cc: Ditto. * mmap.cc: Ditto. * netdb.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * pinfo.cc: Ditto. * pinfo.h: Ditto. * pthread.cc: Ditto. * registry.cc: Ditto. * shared.cc: Ditto. * shared_info.h: Ditto. * smallprint.c: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * thread.h: Ditto. * uinfo.cc: Ditto. * winsup.h: Ditto. * include/limits.h: Ditto. * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
This commit is contained in:
@ -611,7 +611,7 @@ fhandler_disk_file::opendir ()
|
||||
|
||||
if (!pc.isdir ())
|
||||
set_errno (ENOTDIR);
|
||||
else if ((len = strlen (pc))> MAX_PATH - 3)
|
||||
else if ((len = strlen (pc))> CYG_MAX_PATH - 3)
|
||||
set_errno (ENAMETOOLONG);
|
||||
else if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
|
||||
set_errno (ENOMEM);
|
||||
@ -718,7 +718,7 @@ fhandler_disk_file::readdir (DIR *dir)
|
||||
int len = strlen (c);
|
||||
if (strcasematch (c + len - 4, ".lnk"))
|
||||
{
|
||||
char fbuf[MAX_PATH + 1];
|
||||
char fbuf[CYG_MAX_PATH + 1];
|
||||
strcpy (fbuf, dir->__d_dirname);
|
||||
strcpy (fbuf + strlen (fbuf) - 1, dir->__d_dirent->d_name);
|
||||
path_conv fpath (fbuf, PC_SYM_NOFOLLOW);
|
||||
|
Reference in New Issue
Block a user