X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Mailer: 21.4 (patch 21) "Educational Television" XEmacs Lucid (via feedmail 10 I)
To: cygwin@cygwin.com
Subject: Re: [Attn: alternatives maintainer] - ghostscript preremove breakage
References: <7zk5j0yt70.fsf@vzell-de.de.oracle.com> 	<4803E1B3.8070809@cwilson.fastmail.fm> 	<7zbq4ct3wv.fsf@vzell-de.de.oracle.com> 	<48040493.7010205@cwilson.fastmail.fm> 	<7zprsrqfzm.fsf@vzell-de.de.oracle.com> 	<480576DA.5070106@cwilson.fastmail.fm>
From: "Dr. Volker Zell" <dr.volker.zell@oracle.com>
Date: Wed, 16 Apr 2008 08:14:36 +0200
In-Reply-To: <480576DA.5070106@cwilson.fastmail.fm> (Charles Wilson's message of "Tue, 	15 Apr 2008 23:47:38 -0400")
Message-ID: <7z63uipbqr.fsf@vzell-de.de.oracle.com>
User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (cygwin32)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>>>>> Charles Wilson writes:

    > Dr. Volker Zell wrote:
    >> This is the relevant code block in alternatives.c where the above
    >> file gets read by the function readConfig (buf should hold the
    >> contents of the above file after the do loop):
    >> curBufSz = READCONFIG_BUF_INITIALSZ;
    >> totalBytesRead = 0;
    >> numBytesRead = 0;
    >> buf = NULL;
    >> do
    >> {
    >> if (curBufSz < READCONFIG_BUF_BEHAVIOR_THRESH)
    >> curBufSz *= 2;
    >> else
    >> curBufSz += READCONFIG_BUF_BEHAVIOR_THRESH;
    >> buf = realloc(buf, curBufSz + 1);
    >> bufp = buf + totalBytesRead;

    > try putting
    > 	*bufp = '\0';
    > right here.

Yup. That's fixes it.

07:51 AM [525]> ./alternatives.exe --display gs
gs - status is auto.
 link currently points to /usr/bin/gs-x11
/usr/bin/gs-x11 - priority 20
Current `best' version is /usr/bin/gs-x11.

07:51 AM [526]> ./alternatives.exe --display unison
unison - status is auto.
 link currently points to /usr/bin/unison-2.27
/usr/bin/unison-2.13 - priority 2013
/usr/bin/unison-2.17 - priority 2017
/usr/bin/unison-2.27 - priority 2027
Current `best' version is /usr/bin/unison-2.27.

Thanks, will you roll a new version ?

  Volker
  

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

