delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/05/01/14:15:04

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Date: Thu, 01 May 2014 21:15:09 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: [PATCH] break xstat.c into pieces
In-reply-to: <CAA2C=vCEwn3dBZKd+YHFh53cLcMESfF5sCZzHgaY=S5AxwMgoQ@mail.gmail.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-id: <83fvktl61e.fsf@gnu.org>
References: <CAA2C=vBuWHmVNrRAcGDSXYLc8Eg_xsyMVszPzrxqHGrpVq2vmw AT mail DOT gmail DOT com> <83wqeh9pwq DOT fsf AT gnu DOT org> <CAA2C=vD_97x3-A0Y52JDfbmmFiuVzF_Ufub6imhmuhTsdsNr4w AT mail DOT gmail DOT com> <83vbu19o4f DOT fsf AT gnu DOT org> <CAA2C=vDAWcPpCex4koZXSdorEid7w1=QTAWip7t0n-exMH+vrQ AT mail DOT gmail DOT com> <83r44p9mjr DOT fsf AT gnu DOT org> <CAA2C=vBWH49B_zu-1rAqxBvHoxKzZL+pqOANTE0H3MPQ2OkROg AT mail DOT gmail DOT com> <CAA2C=vD-a_Tx+ZzseEuZU_-U7eJYEsLFNwWVdKLmm85_7_N9qA AT mail DOT gmail DOT com> <83r44elogs DOT fsf AT gnu DOT org> <CAA2C=vCsFzQ9mip4ZTxL8+UPpqbZUQdX=ZDqzTK3V7zbgKm95g AT mail DOT gmail DOT com> <83k3a5l8fk DOT fsf AT gnu DOT org> <CAA2C=vCEwn3dBZKd+YHFh53cLcMESfF5sCZzHgaY=S5AxwMgoQ AT mail DOT gmail DOT com>
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

> Date: Thu, 1 May 2014 20:55:18 +0300
> From: Ozkan Sezer <sezeroz AT gmail DOT com>
> 
> On 5/1/14, Eli Zaretskii <eliz AT gnu DOT org> wrote:
> >> Date: Wed, 30 Apr 2014 21:02:03 +0300
> >> From: Ozkan Sezer <sezeroz AT gmail DOT com>
> >>
> >> #include <sys/stat.h>
> >> #include <errno.h>
> >> #include <stdio.h>
> >> int main () {
> >>    if (mkdir("C:",0755)<0) printf("C:  -> errno: %d\n",errno);
> >>    if (mkdir("C:\\",0755)<0) printf("C:\\ -> errno: %d\n",errno);
> >>    if (mkdir("C:/",0755)<0) printf("C:/ -> errno: %d\n",errno);
> >>    if (mkdir(".",0755)<0) printf(". -> errno: %d\n",errno);
> >>    if (mkdir("hexen2",0755)<0) printf("hexen2  -> errno: %d\n",errno);
> >>    if (mkdir("hexen2\\",0755)<0) printf("hexen2\\ -> errno: %d\n",errno);
> >>    return 0;
> >> }
> >>
> >> Running the exe from C:\ prints the following:
> >>
> >> Under dosbox:
> >>
> >> C:  -> errno: 10
> >> C:\ -> errno: 22
> >> C:/ -> errno: 10
> >> . -> errno: 10
> >> hexen2  -> errno: 10
> >> hexen2\ -> errno: 22
> >
> > Is this on Windows or some other OS (I'm not sure I understand what do
> > you mean by "dosbox")?
> 
> http://www.dosbox.com/
> 
> >
> > If this isn't on Windows, could someone please test on XP?  I'm
> > somewhat worried about the C:\ case above.
> >
> 
> Just tested on a real dos i.e. IBM PC DOS 7 installed on a pentium 166:
> 
> C:  -> errno: 22
> C:\ -> errno: 10
> C:/ -> errno: 10
> . -> errno: 10
> hexen2  -> errno: 10
> hexen2\ -> errno: 22
> 
> Same results with and without the patch applied

Thanks, I think these results are OK.

> > How about moving it to is_exec.c?  AFAICT, every library function that
> > accesses djstat_flags also calls _is_executable, so it sounds like no
> > additional bloat will follow if we move the variable there.
> >
> > Thanks.
> >
> 
> I don't see why a new file is so very offending, but OK I guess ..

It's not offending, it just seemed excessive to me.

Do you have write access?  If so, would you please commit these two
changes?

- Raw text -


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