[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] fread and _wfopen
From:       Martin Mocko <vid512 () gmail ! com>
Date:       2010-09-30 22:19:52
Message-ID: AANLkTim9-=Np3RpSwrOkjSD5rL6YaHJ=M5z8DR24207u () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Sep 30, 2010 at 11:31 PM, Tor Lillqvist <tml@iki.fi> wrote:

> > Aren't you by any chance mixing fopen() from glibc with _wfopen() from
> > Win32API? According to MSDN, they both operate on same structure,
> readable
> > by Win32API fread().
>
> What does glibc, the GNU C library, nowadays supported (as far as I
>  know) only for Linux, has to do with this thread or MinGW in general?


Correct, my bad. Because of seeing MinGW supporting POSIX stuff not
supported by MSVC, I got this wrong impression somehow.

Anyway, in this case it seems that it's okay to use fsetpos() / fgetpos() /
fread() on both files opened by fopen() and _wfopen(), and fread() should do
just what you want - read unformatted bytes into buffer. Are you sure it is
fread() that slows you down?

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 11:31 PM, Tor Lillqvist \
<span dir="ltr">&lt;<a href="mailto:tml@iki.fi">tml@iki.fi</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <div class="im">&gt; Aren&#39;t you by any chance \
mixing fopen() from glibc with _wfopen() from<br> &gt; Win32API? According to MSDN, \
they both operate on same structure, readable<br> &gt; by Win32API fread().<br>
<br>
</div>What does glibc, the GNU C library, nowadays supported (as far as I<br> know) \
only for Linux, has to do with this thread or MinGW in general?  \
</blockquote><div><br></div><div>Correct, my bad. Because of seeing MinGW supporting \
POSIX stuff not supported by MSVC, I got this wrong impression somehow.</div> \
<div><br></div><div>Anyway, in this case it seems that it&#39;s okay to use fsetpos() \
/ fgetpos() / fread() on both files opened by fopen() and _wfopen(), and fread() \
should do just what you want - read unformatted bytes into buffer. Are you sure it is \
fread() that slows you down?</div> </div>



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic