Problems using stat function

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Wed Aug 13 20:05:00 GMT 2008


Ignasi Villagrasa wrote:
>  
> Hi everyone,
>  
> I'm migrating an old WATCOM C++ based application to cygwin, using
> -mno-cygwin in order to make the converted executable as similar as
> possible to the original one.
> 
> I get a problem using
> 
> int stat ( const char *__path, struct stat *__sbuf );
> 
> I get an improper offset and so size comes on the st_atime field instead
> of st_size.
> 
> Is there any report or known bug related to this behaviour ?
> 
> It seems library doen't map properly the pointed structure.
> 
> Before going on to dicover what provokes the problem (Library, used
> include), I'd like to know if someone has ever found this behaviour also.

The -mno-cygwin switch means exactly what it says - you're not using
Cygwin.  What you're actually using is a pseudo-cross compiler targeting
Windows APIs (instead of Cygwin's POSIX APIs).  This functionality comes
from <http://mingw.org/>.  You should research your issue there.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list