Mail Archives: djgpp-workers/2014/05/01/13:23:24
> 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")?
If this isn't on Windows, could someone please test on XP? I'm
somewhat worried about the C:\ case above.
> >> --- /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.
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.
- Raw text -