Does anybody know about (or is working on) this?
Compiling with:
xx.c
cl -nologo -GF -W3 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DNO_HASH_SEED -Zi -I./include -IC:\usr\loc
al\icu\include -DHAS_JIT -DI386 -I. -Fo xx.obj -c xx.c
src\platform.c
platform.c
config\gen\platform\generic\stat.c(81) : error C2039: 'st_blksize' : is not a member of 'stat'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\sys\stat.h(99) : see declaration of 'st
at'
config\gen\platform\generic\stat.c(84) : error C2039: 'st_blocks' : is not a member of 'stat'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\sys\stat.h(99) : see declaration of 'st
at'
config\gen\platform\generic\stat.c(152) : error C2039: 'st_blksize' : is not a member of 'stat'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\sys\stat.h(99) : see declaration of 'st
at'
config\gen\platform\generic\stat.c(155) : error C2039: 'st_blocks' : is not a member of 'stat'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\sys\stat.h(99) : see declaration of 'st
at'
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.
Jonathan
#if defined(__MINGW32__)
around those lines. I can change it to defined(WIN32), or we write a win32
version of stat.c.
This there a Win32 API stat()-like function that makes it worth to write
win32/stat.c?
jens
Not one that I have found. And:
perl returns no value for block size and blocks on Activestate Perl
5.8.4 (on win32).
C:\temp>echo "Hello World!" >hello
C:\temp>perl -e "my $i=0; print map { $i++.\"\t$_\n\" } stat 'hello'"
0 2
1 0
2 33206
3 1
4 0
5 0
6 2
7 17
8 1097234100
9 1097234100
10 1097234100
11
12
Python doesn't seem to provide it either
http://docs.python.org/lib/module-stat.html
Should parrot skip it altogether, too?
All the stat things with _PLATFORM_ in their names are meant to be
platform-dependent things, so not having them on windows is just
fine. I thought they'd be part of the standard stat interface and
thus not a problem (albeit perhaps returning 0 or something
meaningless) on platforms that supported stat() but didn't do
individual things, but I guess not. :(
Having a win-specific stat.c is probably in order, with it not
defining any of the unavailable _PLATFORM_ things. (As well as adding
in anything win-specific that it might be useful to have, but after
0.1.1 gets released)
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
> Having a win-specific stat.c is probably in order, with it not
> defining any of the unavailable _PLATFORM_ things. (As well as adding
> in anything win-specific that it might be useful to have, but after
> 0.1.1 gets released)
Thanks for explaining things to me. Hope the patch [perl #31897] will do.
> Looks like it probably just needs a win32/stat.c writing...I won't have time
> to look properly for a day or two though. So do feel free to beat me to a
> patch. :-)
Done. ;-) Thanks for your advice.