MisterE wrote:
Is there anything in c standard about the operation of file streams
etc. in reguards to how they are supposed to act if an over flow
occurs.
Overflow for a file?
All that Standard C guarantees is that the various I/O functions of the
Standard library, (like putc, printf etc.), will return a status value
indicating success or failure. The variable `errno` may or may not be
set to any meaningful value.
Thus though you can detect a failed operation, it's generally difficult
or not possible with Standard C to find out _why_ the operation has
failed. You might have to depend upon implementation and system
specific methods.
I am trying to work out the correct way to handle files that
are greater than 2^32 bytes.
On 32 bit systems, you very probably have to use non-Standard
alternatives like ftello, ftello64 etc.
You shouldn't have a problem on 64 bit systems.
Different compilers/operating systems
etc. all behave different for ftell.
No. ftell behaves the way the Standard defines it. However it may or may
not be sufficient under certain conditions.
I guess the answer is its
undefined...
It _is_ defined. You're going beyond it's specification however, so what
do you expect?