Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #31884] Compile fails on Win32 b/c of "stat"

0 views
Skip to first unread message

Ron Blaschke

unread,
Oct 7, 2004, 4:26:12 PM10/7/04
to bugs-bi...@rt.perl.org
# New Ticket Created by Ron Blaschke
# Please include the string: [perl #31884]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31884 >


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 Worthington

unread,
Oct 7, 2004, 5:38:01 PM10/7/04
to perl6-i...@perl.org, bugs-bi...@rt.perl.org
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. :-)

Jonathan

Jens Rieks

unread,
Oct 8, 2004, 4:46:35 AM10/8/04
to perl6-i...@perl.org
On Thursday 07 October 2004 22:26, Ron Blaschke wrote:
> config\gen\platform\generic\stat.c(81) : error C2039: 'st_blksize' : is not
> a member of 'stat'
I am working on MINGW support and had this error, too. I just added

#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

Ronald Blaschke

unread,
Oct 8, 2004, 9:59:12 AM10/8/04
to perl6-i...@perl.org
> This there a Win32 API stat()-like function that makes it worth to write
> win32/stat.c?

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?

Dan Sugalski

unread,
Oct 8, 2004, 10:08:13 AM10/8/04
to Ronald Blaschke, perl6-i...@perl.org
At 3:59 PM +0200 10/8/04, Ronald Blaschke wrote:
> > This there a Win32 API stat()-like function that makes it worth to write
>> win32/stat.c?
>
>Not one that I have found. And:
>perl returns no value for block size and blocks on Activestate Perl
>5.8.4 (on win32).

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

Ronald Blaschke

unread,
Oct 8, 2004, 11:28:57 AM10/8/04
to perl6-i...@perl.org
On Fri, 8 Oct 2004 10:08:13 -0400, Dan Sugalski wrote:
> At 3:59 PM +0200 10/8/04, Ronald Blaschke wrote:
>> > This there a Win32 API stat()-like function that makes it worth to write
>>> win32/stat.c?
>>
>>Not one that I have found. And:
>>perl returns no value for block size and blocks on Activestate Perl
>>5.8.4 (on win32).
>
> 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)

Thanks for explaining things to me. Hope the patch [perl #31897] will do.

Ron Blaschke

unread,
Oct 9, 2004, 10:43:13 AM10/9/04
to Jonathan Worthington, perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
Thursday, October 7, 2004, 11:38:01 PM, Jonathan Worthington wrote:

> 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.


0 new messages