delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm |
Sender: | cygwin-apps-owner AT sourceware DOT cygnus DOT com |
List-Subscribe: | <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin-apps/> |
List-Post: | <mailto:cygwin-apps AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs> |
Delivered-To: | mailing list cygwin-apps AT sources DOT redhat DOT com |
Message-ID: | <039601c16b00$88417dd0$0200a8c0@lifelesswks> |
From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
To: | <cygwin-apps AT cygwin DOT com> |
References: | <20011111060349 DOT GA23640 AT redhat DOT com> |
Subject: | Re: [PATCH] Found a potential setup.exe problem while working on cygcheck |
Date: | Mon, 12 Nov 2001 09:30:56 +1100 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
X-OriginalArrivalTime: | 11 Nov 2001 22:36:48.0662 (UTC) FILETIME=[59AB4360:01C16B01] |
----- Original Message ----- From: "Christopher Faylor" <cgf AT redhat DOT com> To: <cygwin-apps AT cygwin DOT com> Sent: Sunday, November 11, 2001 5:03 PM Subject: [PATCH] Found a potential setup.exe problem while working on cygcheck > Here's YA reason for a unified library. I found a problem while working > on cygcheck. AFAICT, my code was correct but gcc was miscompiling it, > ending up with a value of 'p' which was not a pointer. > > The code below fixes that problem. > > Does this look ok? It seems to do the right thing in cygcheck. Sure, but I think I've found the bug... > cgf > > > if (!f.what[0]) > { > p = strchr (ver, '\0'); > strcpy (f.pkgtar, in_fn); > if ((p -= 4) >= ver && strcasecmp (p, "-src") == 0) > { > strcpy (f.what, "src"); > *p = '\0'; > p = f.pkgtar + (p - fn) + 4; .......................^^^^^^.... (- fn) is a constant, as fn is a local variable. This seems wrong to me, as p is set relative to f. Rob
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |