| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| X-Mailer: | 21.4 (patch 21) "Educational Television" XEmacs Lucid (via feedmail 10 I) |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: [Attn: alternatives maintainer] - ghostscript preremove breakage |
| References: | <7zk5j0yt70 DOT fsf AT vzell-de DOT de DOT oracle DOT com> <4803E1B3 DOT 8070809 AT cwilson DOT fastmail DOT fm> <7zbq4ct3wv DOT fsf AT vzell-de DOT de DOT oracle DOT com> <48040493 DOT 7010205 AT cwilson DOT fastmail DOT fm> <7zprsrqfzm DOT fsf AT vzell-de DOT de DOT oracle DOT com> <480576DA DOT 5070106 AT cwilson DOT fastmail DOT fm> |
| From: | "Dr. Volker Zell" <dr DOT volker DOT zell AT oracle DOT 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 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |