Web lists-archives.com

Re: [Mingw-users] I need a compatible stat64




> Date: Tue, 5 Jan 2016 12:19:15 -0800
> From: Greg Jung <gvjung@xxxxxxxxx>
> 
>     What version of the MinGW runtime do you have?
> 
> mingw 3.21, recently built from sourceforge download. 
> [...]
>     In any case, I think you want _stat64, not stat64. Just look at
>     what's in your sys/stat.h header file, and take it from there.
> 
> I want to use a name that is not platform-specific. 

If there is one, yes.  But what if there isn't?

> stat64 is available and documented ...
> 
> http://www.gnu.org/software/libc/manual/html_node/Reading-Attributes.html 

That manual is about glibc, whereas with MinGW you are using the
Microsoft runtime libraries (with small additions from the MinGW
project).  So what that manual says is not very relevant to your
problem.

I've just looked in the 3.21 headers, and I see no declaration of a
function named stat64 there.  I do see _stat64.  So I still think this
is what you should use with MinGW.

> BTW, I found a segmentation fault error when compiling this example (presented
> with stat64 removed):
> http://mingw-users.1079350.n2.nabble.com/MinGw-opendir-stat64-and-related-td7268987.html
> 
> (which worked compiled with the mingw-w64 gcc 5.2)

MinGW-w64 is a separate project, with subtly incompatible header
files.  You cannot always copy to MinGW what you have working with
MinGW-w64.

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe