This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: SYSTEMROOT, SYSTEMDRIVE
- To: Christopher Faylor <cygwin-patches at cygwin dot com>
- Subject: Re: SYSTEMROOT, SYSTEMDRIVE
- From: egor duda <deo at logos-m dot ru>
- Date: Thu, 10 May 2001 13:24:18 +0400
- Organization: deo
- References: <20010508001319.A16059@redhat.com><8111460809.20010508190550@logos-m.ru> <12720489682.20010509223903@logos-m.ru><20010509162006.C2089@redhat.com>
- Reply-To: egor duda <cygwin-patches at cygwin dot com>
Hi!
Thursday, 10 May, 2001 Christopher Faylor cgf@redhat.com wrote:
CF> The difference is the call to the "OS". It's optional in my case and
CF> mandatory in yours. I don't know if this makes a difference but I would
CF> bet that the scanning of the environment is not a quick process. That
CF> would be weighed against the potentially extra two elements to be sorted
CF> by qsort.
CF> Hmm. Actually, you stop checking for the extra variables after the
CF> build of winenv passes the place where they would be placed, too,
CF> so that is a difference.
yes, because both lists are sorted.
CF> I don't know. I think that the calls to GetEnvironmentVariable outweigh
CF> anything else, especially since most of the time they probably aren't
CF> needed.
CF> Comments?
you're right. always calling GetEnvironmentVariable is a waste of
time. i've changed my patch to
- avoid repeated scanning of forced env vars list.
- look into native environment only when needed.
- don't truncate forced vars values to MAX_PATH symbols.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
force-systemroot-2.diff
force-systemroot-2.ChangeLog