I seem to have narrowed it down to the stdio.h file I/O routines.
I am using ftell(), fread(), fseek(), fopen(), rewind(), fclose().
in the function with the problems, I make use of the above except for possibly 
rewind().

I use fseek with 0L,SEEK_END to discover the file size (I need something 
platform-independent if possible).

personally, I can't stand using ftell and fseek, because they are 32-bit only.  
IF the f-series functions had a STANDARD 32/64-bit (depending on platform, 
maximizing its capability on whatever you've got) function for seeking to 
beginning, end, and setting a position, this would be most welcome.  I would 
like to see ftell() and fseek() (the most popular ones, especially in schools) 
become one of those functions so I can get file size, maybe even add a filesize 
function if it were part of the ANSI C library would be nice.  again, I would 
want a 64-bit function with 64-bit results where a 64-bit filesystem is 
possible.  


and if I have to use a #define to switch 32/64-bit I would like to enable it 
the SAME WAY on every compiler.  *that* ought to be a language standard.  mingw 
compiler uses __MSVCRT__, linux gcc uses 2 #defines, mingw-w64 uses absence of 
NO_OLDNAMES, etc.  maybe there should be a single standard #define which sets 
the number of bits width for the filesystem.  for instance, 

#define FILESYSTEM_BIT_WIDTH 64
the compiler could automatically #define FILESYSTEM_BIT_WIDTH 64 on windows 
systems and as a user I would just need to #undef it and redefine it (unless a 
simple #define would do, I not a total expert on #defines). for arduinos and 
other platforms which have no filesystem, it could simply define it as 0.  some 
embedded systems may be 32-bit or even 16-bit and may still have a filesystem.



but in my program I use the #defines and #ifdefs outlined on my web page 
http://JesusnJim.com/code/compiler/mingw.html which enable fsetpos and fgetpos 
to become 64-bit.  in mingw-w64 this I think means #undef NO_OLDNAMES
this may be affecting something negatively?  I don't know.  it didn't look like 
it affected any of the functions listed up top in stdio.h.  I don't know what 
all this #define does.
all I wanted was in all my programs to have a 64-bit fsetpos and fgetpos.  
enabling old names doesn't look very appealing to me and it doesn't sound like 
a good idea, but it's the only way in mingw-w64 2011127.

if I switch out the file functions where a FILE * f is required or filepath (I 
ask for one or the other) is required for equivalent <string> functions 
containing the file content, the program works perfectly.  Interesting?

 
-------------
Jim Michaels
[email protected]
[email protected]
http://JimsComputerRepairandWebDesign.com
http://JesusnJim.com (my personal site, has software)
---
Computer memory measurements, SSD measurements, microsoft disk size 
measurements (note: they will say GB or MB or KB or TB when it is not!):
[KiB] [MiB] [GiB] [TiB]
[2^10B=1,024B=1KiB]
[2^20B=1,048,576B=1MiB]
[2^30B=1,073,741,824B=1GiB]
[2^40B=1,099,511,627,776B=1TiB]
hard disk industry disk size measurements:
[KB] [MB] [GB] [TB]
[10^3B=1,000B=1KB]
[10^6B=1,000,000B=1MB]
[10^9B=1,000,000,000B=1GB]
[10^12B=1,000,000,000,000B=1TB]






>________________________________
> From: JonY <[email protected]>
>To: [email protected] 
>Sent: Friday, February 3, 2012 5:01 PM
>Subject: Re: [Mingw-w64-public] problem with compiler?
> 
>On 2/4/2012 08:38, Jim Michaels wrote:
>> the auto build, 20111127 release I am having problems with.  this gets stuck 
>> in a forever loop with lwi==0 and it shouldn't.
>> this is not by any means a complete program.  but I am almost sure this is a 
>> bug in the compiler (code generator?).
>> what I end up with is it has a forever loop and lwi the for loop index NEVER 
>> increments beyond 0.
>> you can zap out all the debug ifdefs if you want.  what I get is a zillion 
>> of these, start to forever:
>> [FFMWPIL:OFF-word:lwi=0:wi=0:lwi+wi=0:lwsize=7:lineword=1:word=timothy]
>> 
>> 
>> Jim Michaels
>> 
>
>Can you try making a minimalist test? Do show your command line options too.
>
>
>
>------------------------------------------------------------------------------
>Try before you buy = See our experts in action!
>The most comprehensive online learning library for Microsoft developers
>is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>Metro Style Apps, more. Free future releases when you subscribe now!
>http://p.sf.net/sfu/learndevnow-dev2
>_______________________________________________
>Mingw-w64-public mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to