delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2008/12/07/17:45:30

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:in-reply-to:mime-version:content-type:references;
bh=sko8wy/33GWaa04S8qIitaS/StmfvxFO1I+Ui4B67+0=;
b=OKpdFyudRM4EcknDArJ/yzso4yh9xu9bTdTK5tP4+xO0rurgIdxyJqy26ilTPpuJpQ
4BwOe8KqHftUgna7wewRyuJfc24PYC74i6fj6BRKIVSD6kaLUYU9CGjYAupRUPqGn3Lz
H/qbaq2ZnxkKcu7k5h8LJSws0D7RbFCJ4kxPk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:in-reply-to:mime-version
:content-type:references;
b=tDC6BMkS2jpVGEaSIwps7KJbxwV0TXoVEudqXHhztpvxchC62SUZTi3gJLq92sldYd
cozSow3TiwhsrgYorhMsU8x0S8SHi3t6MKEdibc5LYV1E7MKofP5PlF5tZ+UNM7cGmj/
EZLN9rS9e01pynVwj3LKZMsbOAuPQ9Kz9FkZ4=
Message-ID: <647fe9b10812071348u18c4c439s1d3b8ba7d8be7c19@mail.gmail.com>
Date: Sun, 7 Dec 2008 23:48:07 +0200
From: "O.Sezer" <sezeroz AT gmail DOT com>
To: djgpp-workers AT delorie DOT com
Subject: Re: One bug fix for opendir/readdir commited
In-Reply-To: <001101c957cd$86db7010$2602a8c0@computername>
MIME-Version: 1.0
References: <001101c957cd$86db7010$2602a8c0 AT computername>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

------=_Part_61564_6750076.1228686487743
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Sat, Dec 6, 2008 at 8:07 PM, Juan Manuel Guerrero
<juan DOT guerrero AT gmx DOT de> wrote:
> OFYI:
> I have checked in the patch below to fix an issue in the DIR structure
> that I have already reported some months ago in
> <http://www.delorie.com/archives/browse.cgi?p=djgpp-workers/2008/05/21/08:23:25>
>
> With this patch the DIR structure no longer will have a trailing "/*.*"
> string appended to the canonicalized directory name.  All libc functions
> that require such a trailing string will take care to append it to the dir
> name when they need it.  This avoids difficulties with code that appends a
> path string to the end of the dir string without first checking that no "/*.*"
> string is already append to it.
>
> Regards,
> Juan M. Guerrero

[...]
> +#define APPEND_STAR_DOT_STAR(dst, src)  \
> +  do {                                  \
> +    int _i;                             \
> +                                        \
> +    for (_i = 0; (src)[_i]; _i++)       \
> +      (dst)[_i] = (src)[_i];            \
> +    (dst)[_i++] = '/';                  \
> +    (dst)[_i++] = '*';                  \
> +    (dst)[_i++] = '.';                  \
> +    (dst)[_i++] = '*';                  \
> +    (dst)[_i++] = '\0';                 \
> +  } while(1)
^^^^^^^^^^^^^

Is this not meant to be a while(0), or what am I missing???
My binaries linked with this one "freezes" when going through
opendir() calls.  Patch attached.

Ozkan

------=_Part_61564_6750076.1228686487743
Content-Type: application/octet-stream; name=APPEND_STAR_DOT_STAR.patch
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fog87d1i0
Content-Disposition: attachment; filename=APPEND_STAR_DOT_STAR.patch

ZGlmZiAtdXJOcCBkamdwcC0yMDA4MTIwNi9zcmMvbGliYy9wb3NpeC9kaXJlbnQvb3BlbmRpci5j
IGRqZ3BwL3NyYy9saWJjL3Bvc2l4L2RpcmVudC9vcGVuZGlyLmMKLS0tIGRqZ3BwLTIwMDgxMjA2
L3NyYy9saWJjL3Bvc2l4L2RpcmVudC9vcGVuZGlyLmMJMjAwOC0xMi0wNiAxNjoxMDoyNC4wMDAw
MDAwMDAgKzAyMDAKKysrIGRqZ3BwL3NyYy9saWJjL3Bvc2l4L2RpcmVudC9vcGVuZGlyLmMJMjAw
OC0xMi0wNyAyMzo0MDoxNi4wMDAwMDAwMDAgKzAyMDAKQEAgLTM0LDggKzM0LDcgQEAKICAgICAo
ZHN0KVtfaSsrXSA9ICcuJzsgICAgICAgICAgICAgICAgICBcCiAgICAgKGRzdClbX2krK10gPSAn
Kic7ICAgICAgICAgICAgICAgICAgXAogICAgIChkc3QpW19pKytdID0gJ1wwJzsgICAgICAgICAg
ICAgICAgIFwKLSAgfSB3aGlsZSgxKQotCisgIH0gd2hpbGUoMCkKIAogdm9pZAogX2xmbl9maW5k
X2Nsb3NlKGludCBoYW5kbGUpCmRpZmYgLXVyTnAgZGpncHAtMjAwODEyMDYvc3JjL2xpYmMvcG9z
aXgvZGlyZW50L3JlYWRkaXIuYyBkamdwcC9zcmMvbGliYy9wb3NpeC9kaXJlbnQvcmVhZGRpci5j
Ci0tLSBkamdwcC0yMDA4MTIwNi9zcmMvbGliYy9wb3NpeC9kaXJlbnQvcmVhZGRpci5jCTIwMDgt
MTItMDYgMTY6MTA6MjYuMDAwMDAwMDAwICswMjAwCisrKyBkamdwcC9zcmMvbGliYy9wb3NpeC9k
aXJlbnQvcmVhZGRpci5jCTIwMDgtMTItMDcgMjM6NDA6NDguMDAwMDAwMDAwICswMjAwCkBAIC0y
Niw3ICsyNiw3IEBACiAgICAgKGRzdClbX2krK10gPSAnLic7ICAgICAgICAgICAgICAgICAgXAog
ICAgIChkc3QpW19pKytdID0gJyonOyAgICAgICAgICAgICAgICAgIFwKICAgICAoZHN0KVtfaSsr
XSA9ICdcMCc7ICAgICAgICAgICAgICAgICBcCi0gIH0gd2hpbGUoMSkKKyAgfSB3aGlsZSgwKQog
CiBzdHJ1Y3QgZGlyZW50ICoKIHJlYWRkaXIoRElSICpkaXIpCgo=
------=_Part_61564_6750076.1228686487743--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019