This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
RE: [PATCH] cygcheck: follow symbolic links
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: cygwin-patches at cygwin dot com
- Date: Fri, 17 Feb 2006 09:05:25 -0500 (EST)
- Subject: RE: [PATCH] cygcheck: follow symbolic links
- References: <00e801c633b6$3b529490$a501a8c0@CAM.ARTIMI.COM>
- Reply-to: cygwin-patches at cygwin dot com
On Fri, 17 Feb 2006, Dave Korn wrote:
> On 16 February 2006 17:27, Igor Peshansky wrote:
>
> > On Thu, 16 Feb 2006, Corinna Vinschen wrote:
>
> >> - Couldn't you just reuse the readlink implementation in ../cygwin/path.cc
> >> as is, to avoid having to different implementations?
> >
> > Umm, most of that code is very general purpose, and has too much extra
> > stuff in it.
>
> I think you may have misoptimised for speed rather than
> maintainability. Cygcheck isn't something that people expect to run a
> million times per second in an inner loop.
No, but I thought ease of understanding implied maintainability...
Besides, I'm sure binutils, for one, has the code for reading chunks of
application code and finding the DLL dependencies -- why aren't we reusing
that? The answer: too much work to extract the needed bits in the form
that would be usable in both places.
> > I basically used part of it (symlink_info::check_shortcut)
> > for my implementation. I wanted something lightweight and easy to
> > understand
>
> Perhaps you could have just exported it (or a convenient interface to
> it) instead?
Ahem. You are forgetting that cygcheck is not a Cygwin program, so we
can't introduce a dependency on cygwin1.dll. We'd have to create an
independent (static?) library that both cygcheck and Cygwin depended on...
> >(also, the code in path.cc doesn't check for PE headers, so I
> > had to write that part anyway).
>
> None of which affects /that/ bit.
Right, I guess...
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"