This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: access () and path.cc


On Fri, Feb 28, 2003 at 12:49:59AM -0500, Pierre A. Humblet wrote:
>OK, following Chris' remarks here is a much smaller set
>of changes.

Do you think it would make sense to do something along the lines
of:

>+      path_conv pc (cfd->is_device ? cfd->get_name () : cfd->get_win32_name (), PC_SYM_NOFOLLOW);

just to minimize the (minimal) performance hit?  Ordinarily, I
wouldn't advocate such a kludge but these are special circumstances.

I suppose you could do something similar in access(), too.

cgf

>Pierre
>
>
>2003-02-28  Pierre Humblet  <pierre dot humblet at ieee dot org>
>
>	* syscalls.cc (fstat64): Pass get_name () to pc.
>	(access): Pass fn to stat_worker. 
>
>Index: syscalls.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v
>retrieving revision 1.246
>diff -u -p -r1.246 syscalls.cc
>--- syscalls.cc 21 Feb 2003 14:29:18 -0000      1.246
>+++ syscalls.cc 28 Feb 2003 05:46:09 -0000
>@@ -1013,7 +1013,7 @@ fstat64 (int fd, struct __stat64 *buf)
>     res = -1;
>   else
>     {
>-      path_conv pc (cfd->get_win32_name (), PC_SYM_NOFOLLOW);
>+      path_conv pc (cfd->get_name (), PC_SYM_NOFOLLOW);
>       memset (buf, 0, sizeof (struct __stat64));
>       res = cfd->fstat (buf, &pc);
>       if (!res && cfd->get_device () != FH_SOCKET)
>@@ -1200,7 +1200,7 @@ access (const char *fn, int flags)
>     return check_file_access (real_path, flags);
> 
>   struct __stat64 st;
>-  int r = stat_worker (real_path, &st, 0);
>+  int r = stat_worker (fn, &st, 0);
>   if (r)
>     return -1;
>   r = -1;
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]