public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: David Rothenberger <daveroth@acm.org>
To: cygapps <cygwin-apps@cygwin.com>
Subject: which for cygwin 1.7
Date: Fri, 12 Dec 2008 23:00:00 -0000	[thread overview]
Message-ID: <4942E9D4.1070808@acm.org> (raw)

I've been looking at rebuilding which for cygwin 1.7. I think there are 
a lot of problems with the current code. It uses static buffers of 
PATH_MAX all over the place, some of which are passed to getcwd().

My C programming skills are a bit rusty, but I can take a stab at fixing 
it. I'd appreciate it if someone else could take a quick look and let me 
know whether it's worth the effort or not.

I'm pretty sure that using a PATH_MAX sized buffer for getcwd() is a 
problem. These buffers are also used to hold output from getenv(). I'm 
not sure if that will be a problem or not.

I guess the alternative is to use a different which package. The one 
from Debian uses a shell script and does not have all the features of 
the current which.

Any suggestions would be appreciated, including if or how to patch the 
current which and alternative which packages to investigate.

-- 
David Rothenberger  ----  daveroth@acm.org

Hlade's Law:
         If you have a difficult task, give it to a lazy person --
         they will find an easier way to do it.

             reply	other threads:[~2008-12-12 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12 23:00 David Rothenberger [this message]
2008-12-13  9:38 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4942E9D4.1070808@acm.org \
    --to=daveroth@acm.org \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).