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=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XLHNUPECv3ATUWKFRuCSxvbERd6NvLKshFn2qIg1OFI=; b=JtZdmXpmLaPNYuM+yKOIXPhxqraWSJKgduGTQwP/zi2ukYzRBR9nIX88gapzGXfiCf OXXTqbGYsHUJBNLDsYdLODKAcDWV4Ir8TAPzIGXSvShbXzzVhZh8cLt3YxVAUwXS7NOl 8W5BxcQ3AIpVxRMCQ4ynj+u+J9WfZOkaYES0qrRTPbVHv0BWUAa2CV4mF4bh4i7dPBwk 7S5udV0JKhWYFG10eYoO0jdKyceu1v+hSb4D8SSqcGWXrD0bFapGv7+0+2McRk+yvOI+ RPG71omyExsQ8BdtkiTayrzrr0Rjxnk11H/hOeb5+OkpA4gJmDB/wNITcoYBe7Kdwrlx XD7g== MIME-Version: 1.0 X-Received: by 10.42.249.8 with SMTP id mi8mr5685777icb.4.1398880923586; Wed, 30 Apr 2014 11:02:03 -0700 (PDT) In-Reply-To: <83r44elogs.fsf@gnu.org> References: <83wqeh9pwq DOT fsf AT gnu DOT org> <83vbu19o4f DOT fsf AT gnu DOT org> <83r44p9mjr DOT fsf AT gnu DOT org> <83r44elogs DOT fsf AT gnu DOT org> Date: Wed, 30 Apr 2014 21:02:03 +0300 Message-ID: Subject: Re: [PATCH] break xstat.c into pieces From: Ozkan Sezer To: djgpp-workers AT delorie DOT com Content-Type: text/plain; charset=UTF-8 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 Precedence: bulk On 4/30/14, Eli Zaretskii wrote: >> Date: Wed, 30 Apr 2014 19:50:29 +0300 >> From: Ozkan Sezer >> >> On 4/22/14, Ozkan Sezer wrote: >> > On 4/22/14, Eli Zaretskii wrote: >> [...] >> > OK, leaving things to you guys. >> > >> >> PING: >> >> If there is still interest in this > > The interest never dwindled, thanks for persevering. > >> I've been using the two patches inlined below (also attached) for >> some time and they work well for me. >> >> >> * mkdir.c: replace access() call with _chmod(). this loses the extra >> _fixpath()+remote rootdir check done by access(), but it shortens >> things by not pulling in extra dependencies. > > What does this set errno to when the argument is "C:/" or some other > root directory? > #include #include #include 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 Under dosemu: C: -> errno: 10 C:\ -> errno: 10 C:/ -> errno: 10 . -> errno: 10 hexen2 -> errno: 10 hexen2\ -> errno: 10 (Can't run under pure real dos at the moment.) >> --- /dev/null >> +++ src/libc/posix/sys/stat/statbits.c 24 Apr 2014 07:51:10 -0000 > > I really don't see why a single short variable should have its own > source file. That would be you, but not me, > I think I suggested to add the variable to crt1.c. > Could you please do that instead? No, that won't be my suggestion. I can't see how a 500% irrelevant flag var can go into crt1.c. Feel free to do so yourself, though. Regards. -- O.S.