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

List:       mingw-notify
Subject:    MinGW-notify Digest, Vol 64, Issue 2
From:       mingw-notify-request () lists ! sourceforge ! net
Date:       2011-09-13 12:17:30
Message-ID: mailman.40396.1315916250.5246.mingw-notify () lists ! sourceforge ! net
[Download RAW message or body]

Send MinGW-notify mailing list submissions to
	mingw-notify@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
	mingw-notify-request@lists.sourceforge.net

You can reach the person managing the list at
	mingw-notify-owner@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-notify digest..."


This list is used to send updates of submitted patches, bug reports and file \
releases.  You are discouraged from posting to this list.  If you wish to unsubscribe \
you can do so at https://lists.sourceforge.net/lists/listinfo/mingw-notify.

Today's Topics:

   1. [ mingw-Bugs-3404358 ] Default _fmode for fopen is	text
      instead of bnary (SF/projects/mingw notification list)
   2. [ mingw-Bugs-3404358 ] Default _fmode for fopen is	text
      instead of bnary (SF/projects/mingw notification list)
   3. [ mingw-Bugs-3406605 ] fread() on stdin returns 0 if	size *
      nmemb >= 28672 (0x7000) (SF/projects/mingw notification list)
   4. [ mingw-Bugs-3406605 ] fread() on stdin returns 0 if	size *
      nmemb >= 28672 (0x7000) (SF/projects/mingw notification list)
   5. [ mingw-Bugs-3406849 ] Wrong icon in taskbar
      (SF/projects/mingw notification list)
   6. [ mingw-Bugs-3408074 ] incompatibilities with	tsearch() & co
      (SF/projects/mingw notification list)
   7. [ mingw-Bugs-3408074 ] incompatibilities with	tsearch() & co
      (SF/projects/mingw notification list)


----------------------------------------------------------------------

Message: 1
Date: Mon, 05 Sep 2011 23:13:53 +0200
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3404358 ] Default _fmode for
	fopen is	text instead of bnary
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40397.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3404358, was opened at 2011-09-05 19:01
Message generated for change (Comment added) made by paugq
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3404358&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
> Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Pau Garcia i Quiles (paugq)
Assigned to: Nobody/Anonymous (nobody)
Summary: Default _fmode for fopen is text instead of bnary

Initial Comment:
In mingw fopen defaults to text mode, instead of binary mode.

It's easy to reproduce the bug using the sample application from \
http://msdn.microsoft.com/en-us/library/61dstksf.aspx

Tested with nuwen mingw distro 7.2 and with mingw 4.4.0 bundled with the latest Qt \
SDK (http://qt.nokia.com). It works fine (defaults to binary mode) with mingw-w64 \
4.7.0. The default with Visual Studio 2010 SP1 is also binary, as it is on Linux.


----------------------------------------------------------------------

Comment By: Pau Garcia i Quiles (paugq)
Date: 2011-09-05 23:13

Message:
Not a MinGW bug.

Although your problem may be interesting and causing you problems you wish
answers to, it is not a problem with the MinGW runtime, 
w32api, GCC, binutils or msys.  Your BUG report has therefore been
deleted.  If you feel that this needs further discussion then 
please post to mingw-users@lists.sourceforge.net.

Thanks for your interest in the MinGW Project,
MinGW Project Administrators

----------------------------------------------------------------------

Comment By: Pau Garcia i Quiles (paugq)
Date: 2011-09-05 23:13

Message:
No, this is correct behavior. It just happens glibc treats binary and text
files the same, while CRT does make a difference. Both approaches abide by
the C standard.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3404358&group_id=2435



------------------------------

Message: 2
Date: Tue, 06 Sep 2011 07:57:20 -0400
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3404358 ] Default _fmode for
	fopen is	text instead of bnary
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40398.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3404358, was opened at 2011-09-05 13:01
Message generated for change (Comment added) made by earnie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3404358&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Pau Garcia i Quiles (paugq)
Assigned to: Nobody/Anonymous (nobody)
Summary: Default _fmode for fopen is text instead of bnary

Initial Comment:
In mingw fopen defaults to text mode, instead of binary mode.

It's easy to reproduce the bug using the sample application from \
http://msdn.microsoft.com/en-us/library/61dstksf.aspx

Tested with nuwen mingw distro 7.2 and with mingw 4.4.0 bundled with the latest Qt \
SDK (http://qt.nokia.com). It works fine (defaults to binary mode) with mingw-w64 \
4.7.0. The default with Visual Studio 2010 SP1 is also binary, as it is on Linux.


----------------------------------------------------------------------

> Comment By: Earnie Boyd (earnie)
Date: 2011-09-06 07:57

Message:
@paugq: When closing the ticket please uncheck the "Close comment posting:"
checkbox to allow the OP the ability to comment.  Nasty SF default is to
halt the comments.

If it can be shown in documentation that more recent versions of MSVC
opens by default in binary mode I would like to see that documentation. 
The default for MSVCRT for years has been text mode.  My guess is that MSVC
is using a switch to open the handles in binary mode.  You can do that by
adding /lib/binmode.o to the link step.

----------------------------------------------------------------------

Comment By: Pau Garcia i Quiles (paugq)
Date: 2011-09-05 17:13

Message:
Not a MinGW bug.

Although your problem may be interesting and causing you problems you wish
answers to, it is not a problem with the MinGW runtime, 
w32api, GCC, binutils or msys.  Your BUG report has therefore been
deleted.  If you feel that this needs further discussion then 
please post to mingw-users@lists.sourceforge.net.

Thanks for your interest in the MinGW Project,
MinGW Project Administrators

----------------------------------------------------------------------

Comment By: Pau Garcia i Quiles (paugq)
Date: 2011-09-05 17:13

Message:
No, this is correct behavior. It just happens glibc treats binary and text
files the same, while CRT does make a difference. Both approaches abide by
the C standard.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3404358&group_id=2435



------------------------------

Message: 3
Date: Fri, 09 Sep 2011 01:19:16 +0100
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3406605 ] fread() on stdin
	returns 0 if	size * nmemb >= 28672 (0x7000)
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40399.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3406605, was opened at 2011-09-09 01:19
Message generated for change (Tracker Item Submitted) made by regregex
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406605&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: mingw runtime
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Greg Cook (regregex)
Assigned to: Nobody/Anonymous (nobody)
Summary: fread() on stdin returns 0 if size * nmemb >= 28672 (0x7000)

Initial Comment:
fread() does not read standard input, returning zero immediately, if the number
of characters to be read is 28672 or more.

Minimal demonstration:
------------------------------------------------------------------------
Greg@totoro ~
$ cat freadx.c
#include <stdio.h>

int main(int argc, char *argv[]);

int
main(int argc, char *argv[]) {
  size_t got;
  char buf[0x8000];

  got = fread(buf, 1, 0x7000, stdin);
  printf("fread() returned %lu, feof(stdin) = %d, ferror(stdin) = %d\n",
    (unsigned long) got, feof(stdin), ferror(stdin));
  return(0);
}

Greg@totoro ~
$ gcc -o freadx freadx.c

Greg@totoro ~
$ ./freadx
fread() returned 0, feof(stdin) = 0, ferror(stdin) = 32
------------------------------------------------------------------------ 

Actual behaviour:
- fread() returns 0 immediately without waiting for input. ferror(stdin) is set.

Expected behaviour:
- fread() should wait for input until EOF or 28672 characters are typed, place
  the characters in buf[] and return the number of characters read.
- ferror(stdin) should remain clear in normal conditions.

Choice of shell:
- Problem demonstrated under sh.exe.
- Problem demonstrated under cmd.exe.
- Calling msys -norxvt, msys -rxvt and msys -mintty make no visible difference to
  the resulting shell.
- rxvt and mintty apparently not installed.

Comments:
- Bug occurs whenever size * nmemb >= 28672 (0x7000).
- Bug remains when the mode of stdin is set to binary.
- Bug remains with setbuf(stdin, NULL) before the fread().
- If freadx.exe is copied to a Windows 98SE system and run there, it waits for
  input until EOF but only the end of the printed message is shown: "n) = 0".
- Bug disappears when input is redirected from a file (freadx < freadx.c)
- Bug disappears when input is piped from a process (sort freadx.c | freadx)
- Bug does not occur with streams fopen()-ed on regular files.

System:
  Microsoft Windows XP
  Home Edition
  Version 2002
  Service Pack 3

Requested version information:
------------------------------------------------------------------------ 
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)

$ ld -v
GNU ld (GNU Binutils) 2.21

$ uname -a
MINGW32_NT-5.1 TOTORO 1.0.16(0.48/3/2) 2010-09-29 00:07 i686 Msys

> From _mingw.h:
#define __MINGW32_VERSION           3.18
#define __MINGW32_MAJOR_VERSION     3
#define __MINGW32_MINOR_VERSION     18
#define __MINGW32_PATCHLEVEL        0

> From w32api.h:
#define __W32API_VERSION 3.17
#define __W32API_MAJOR_VERSION 3
#define __W32API_MINOR_VERSION 17
------------------------------------------------------------------------ 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406605&group_id=2435



------------------------------

Message: 4
Date: Fri, 09 Sep 2011 07:37:55 -0400
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3406605 ] fread() on stdin
	returns 0 if	size * nmemb >= 28672 (0x7000)
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40400.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3406605, was opened at 2011-09-08 20:19
Message generated for change (Comment added) made by earnie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406605&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: mingw runtime
> Group: Known bugs
> Status: Closed
> Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Greg Cook (regregex)
Assigned to: Nobody/Anonymous (nobody)
Summary: fread() on stdin returns 0 if size * nmemb >= 28672 (0x7000)

Initial Comment:
fread() does not read standard input, returning zero immediately, if the number
of characters to be read is 28672 or more.

Minimal demonstration:
------------------------------------------------------------------------
Greg@totoro ~
$ cat freadx.c
#include <stdio.h>

int main(int argc, char *argv[]);

int
main(int argc, char *argv[]) {
  size_t got;
  char buf[0x8000];

  got = fread(buf, 1, 0x7000, stdin);
  printf("fread() returned %lu, feof(stdin) = %d, ferror(stdin) = %d\n",
    (unsigned long) got, feof(stdin), ferror(stdin));
  return(0);
}

Greg@totoro ~
$ gcc -o freadx freadx.c

Greg@totoro ~
$ ./freadx
fread() returned 0, feof(stdin) = 0, ferror(stdin) = 32
------------------------------------------------------------------------ 

Actual behaviour:
- fread() returns 0 immediately without waiting for input. ferror(stdin) is set.

Expected behaviour:
- fread() should wait for input until EOF or 28672 characters are typed, place
  the characters in buf[] and return the number of characters read.
- ferror(stdin) should remain clear in normal conditions.

Choice of shell:
- Problem demonstrated under sh.exe.
- Problem demonstrated under cmd.exe.
- Calling msys -norxvt, msys -rxvt and msys -mintty make no visible difference to
  the resulting shell.
- rxvt and mintty apparently not installed.

Comments:
- Bug occurs whenever size * nmemb >= 28672 (0x7000).
- Bug remains when the mode of stdin is set to binary.
- Bug remains with setbuf(stdin, NULL) before the fread().
- If freadx.exe is copied to a Windows 98SE system and run there, it waits for
  input until EOF but only the end of the printed message is shown: "n) = 0".
- Bug disappears when input is redirected from a file (freadx < freadx.c)
- Bug disappears when input is piped from a process (sort freadx.c | freadx)
- Bug does not occur with streams fopen()-ed on regular files.

System:
  Microsoft Windows XP
  Home Edition
  Version 2002
  Service Pack 3

Requested version information:
------------------------------------------------------------------------ 
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)

$ ld -v
GNU ld (GNU Binutils) 2.21

$ uname -a
MINGW32_NT-5.1 TOTORO 1.0.16(0.48/3/2) 2010-09-29 00:07 i686 Msys

> From _mingw.h:
#define __MINGW32_VERSION           3.18
#define __MINGW32_MAJOR_VERSION     3
#define __MINGW32_MINOR_VERSION     18
#define __MINGW32_PATCHLEVEL        0

> From w32api.h:
#define __W32API_VERSION 3.17
#define __W32API_MAJOR_VERSION 3
#define __W32API_MINOR_VERSION 17
------------------------------------------------------------------------ 


----------------------------------------------------------------------

> Comment By: Earnie Boyd (earnie)
Date: 2011-09-09 07:37

Message:
We cannot fix this.  The fread() function comes from the MSVCRT.DLL which
is part of your delivered Microsoft Windows system.  You need to file the
bug report with Microsoft.

Wont Fix == Can't fix.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406605&group_id=2435



------------------------------

Message: 5
Date: Fri, 09 Sep 2011 20:22:23 +0300
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3406849 ] Wrong icon in taskbar
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40401.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3406849, was opened at 2011-09-09 20:22
Message generated for change (Tracker Item Submitted) made by love4boobies
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406849&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MSYS
Group: Future MSYS enhancement
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Love4Boobies (love4boobies)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wrong icon in taskbar

Initial Comment:
It would be nice if a running instance of the shell also displayed its icon on the \
taskbar instead of using the generic application icon. It would make it easier for us \
to locate because e.g., in Windows Vista and Windows 7 names are not displayed by \
default (because window grouping is activated).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3406849&group_id=2435



------------------------------

Message: 6
Date: Mon, 12 Sep 2011 16:44:48 +0300
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3408074 ] incompatibilities with
	tsearch() & co
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40402.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3408074, was opened at 2011-09-12 16:44
Message generated for change (Tracker Item Submitted) made by sezero
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3408074&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: mingw runtime
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ozkan Sezer (sezero)
Assigned to: Nobody/Anonymous (nobody)
Summary: incompatibilities with tsearch() & co

Initial Comment:
This is a FYI bug report:  We've been using your tsearch.c & co in mingw-w64 and \
found some problems, see attached t_tsearch.c testcase. The issues are handled in our \
svn repo as of rev. 4413.  In case you are interested.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3408074&group_id=2435



------------------------------

Message: 7
Date: Tue, 13 Sep 2011 08:17:29 -0400
From: SF/projects/mingw notification list
	<mingw-notify@lists.sourceforge.net>
Subject: [MinGW-notify] [ mingw-Bugs-3408074 ] incompatibilities with
	tsearch() & co
To: SourceForge.net <noreply@sourceforge.net>
Message-ID:
	<mailman.40403.1315916250.5246.mingw-notify@lists.sourceforge.net>
Content-Type: text/plain; charset=UTF-8

Bugs item #3408074, was opened at 2011-09-12 09:44
Message generated for change (Comment added) made by earnie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3408074&group_id=2435

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: mingw runtime
Group: None
> Status: Closed
> Resolution: Invalid
Priority: 5
Private: No
Submitted By: Ozkan Sezer (sezero)
Assigned to: Nobody/Anonymous (nobody)
Summary: incompatibilities with tsearch() & co

Initial Comment:
This is a FYI bug report:  We've been using your tsearch.c & co in mingw-w64 and \
found some problems, see attached t_tsearch.c testcase. The issues are handled in our \
svn repo as of rev. 4413.  In case you are interested.

----------------------------------------------------------------------

> Comment By: Earnie Boyd (earnie)
Date: 2011-09-13 08:17

Message:
Wrong project.  You need to file your bug report with the
http://sf.net/projects/mingw-w64 project.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3408074&group_id=2435



------------------------------

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 

------------------------------

_______________________________________________
MinGW-notify mailing list
MinGW-notify@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-notify


End of MinGW-notify Digest, Vol 64, Issue 2
*******************************************


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

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