


Synopsys:
     #include <stdio.h>
     FILE *fopen64(const char *FILE, const char *MODE);
     FILE *_fopen64_r(void *REENT,
         const char *FILE, const char *MODE);
   
Description:
'fopen64'/'_fopen64_r' is identical to fopen except it opens a large file that is
potentially >2GB in size.  See fopen for further details.

Returns:
fopen64 return a file pointer which you can use for other file
operations, unless the file you requested could not be opened; in that
situation, the result is NULL.  If the reason for failure was an
invalid string at MODE, errno is set to 'EINVAL'.

Portability:
fopen64 is a glibc extension.

   Supporting OS subroutines required: close, fstat64, isatty,
lseek64, open64, read, sbrk, write.

 





Synopsys:
     #include <stdio.h>
     FILE *freopen64(const char *FILE, const char *MODE,
         FILE *FP);
     FILE *_freopen64_r(struct _reent *PTR, const char *FILE,
         const char *MODE, FILE *FP);
   
Description:
Use 'freopen64'/'_freopen64_r' if you wish to specify a particular file
descriptor FP (notably stdin, stdout, or stderr) for the file.

   If FP was associated with another file or stream, freopen64 closes
that other file or stream (but ignores any errors while closing it).

   FILE and MODE are used just as in fopen.

Returns:
If successful, the result is the same as the argument FP.  If the file
cannot be opened as specified, the result is NULL.

Portability:
freopen is a glibc extension.

   Supporting OS subroutines required: close, fstat, isatty,
lseek64, open64, read, sbrk, write.

 





Synopsys:
     #include <stdio.h>
     _off64_t ftello64(FILE *FP);
     _off64_t _ftello64_r(struct _reent *PTR, FILE *FP);
   
Description:
Objects of type FILE can have a "position" that records how much of
the file your program has already read.  Many of the stdio functions
depend on this position, and many change it as a side effect.

   The result of 'ftello64'/'_ftello64_r' is the current position for a large file
identified by FP.  If you record this result, you can later use it with
fseeko64 to return the file to this position.  The difference between
ftello and ftello64 is that ftello returns off_t and ftello64
is designed to work for large files (>2GB) and returns '_off64_t'.

   In the current implementation, ftello64 simply uses a character
count to represent the file position; this is the same number that
would be recorded by fgetpos64.

   The function exists only if the '__LARGE64_FILES' flag is defined.  An
error occurs if the FP was not opened via fopen64.

Returns:
ftello64 returns the file position, if possible.  If it cannot do
this, it returns -1.  Failure occurs on streams that do not support
positioning or not opened via fopen64; the global errno indicates
this condition with the value 'ESPIPE'.

Portability:
ftello64 is a glibc extension.

   No supporting OS subroutines are required.

 





Synopsys:
     #include <stdio.h>
     int fseeko64(FILE *FP, _off64_t OFFSET, int WHENCE)
     int _fseeko64_r (struct _reent *PTR, FILE *FP,
         _off64_t OFFSET, int WHENCE)
   
Description:
Objects of type FILE can have a "position" that records how much of
the file your program has already read.  Many of the stdio functions
depend on this position, and many change it as a side effect.

   You can use 'fseeko64'/'_fseeko64_r' to set the position for the file identified by
FP that was opened via fopen64.  The value of OFFSET determines the
new position, in one of three ways selected by the value of WHENCE
(defined as macros in stdio.h):

   SEEK_SET--OFFSET is the absolute file position (an offset from the
beginning of the file) desired.  OFFSET must be positive.

   SEEK_CUR--OFFSET is relative to the current file position.  OFFSET
can meaningfully be either positive or negative.

   SEEK_END--OFFSET is relative to the current end of file.  OFFSET
can meaningfully be either positive (to increase the size of the file)
or negative.

   See ftello64 to determine the current file position.

Returns:
fseeko64 returns 0 when successful.  On failure, the result is
EOF.  The reason for failure is indicated in errno: either ESPIPE
(the stream identified by FP doesnt support repositioning or wasnt
opened via fopen64) or EINVAL (invalid file position).

Portability:
fseeko64 is a glibc extension.

   Supporting OS subroutines required: close, fstat64, isatty,
lseek64, read, sbrk, write.

 





Synopsys:
     #include <stdio.h>
     int fgetpos64(FILE *FP, _fpos64_t *POS);
     int _fgetpos64_r(struct _reent *PTR, FILE *FP,
         _fpos64_t *POS);
   
Description:
Objects of type FILE can have a "position" that records how much of
the file your program has already read.  Many of the stdio functions
depend on this position, and many change it as a side effect.

   You can use 'fgetpos64'/'_fgetpos64_r' to report on the current position for a file
identified by FP that was opened by fopen64; fgetpos will write a
value representing that position at *POS.  Later, you can use this
value with fsetpos64 to return the file to this position.

   In the current implementation, fgetpos64 simply uses a character
count to represent the file position; this is the same number that
would be returned by ftello64.

Returns:
fgetpos64 returns 0 when successful.  If fgetpos64 fails, the
result is 1.  Failure occurs on streams that do not support
positioning or streams not opened via fopen64; the global errno
indicates these conditions with the value ESPIPE.

Portability:
fgetpos64 is a glibc extension.

   No supporting OS subroutines are required.

 





Synopsys:
     #include <stdio.h>
     int fsetpos64(FILE *FP, const _fpos64_t *POS);
     int _fsetpos64_r(struct _reent *PTR, FILE *FP,
         const _fpos64_t *POS);
   
Description:
Objects of type FILE can have a "position" that records how much of
the file your program has already read.  Many of the stdio functions
depend on this position, and many change it as a side effect.

   You can use 'fsetpos64'/'_fsetpos64_r' to return the large file identified by FP to
a previous position *POS (after first recording it with fgetpos64).

   See fseeko64 for a similar facility.

Returns:
fgetpos64 returns 0 when successful.  If fgetpos64 fails, the
result is 1.  The reason for failure is indicated in errno: either
ESPIPE (the stream identified by FP doesnt support 64-bit
repositioning) or EINVAL (invalid file position).

Portability:
fsetpos64 is a glibc extension.

   Supporting OS subroutines required: close, fstat, isatty,
lseek64, read, sbrk, write.

 





Synopsys:
     #include <stdio.h>
     FILE *tmpfile64(void);

     FILE *_tmpfile64_r(void *REENT);
   
Description:
'tmpfile64' creates a large temporary file (a file which will be deleted
automatically), using a name generated by tmpnam.  The temporary file
is opened with the mode "wb+", permitting you to read and write
anywhere in it as a binary file (without any data transformations the
host system may perform for text files).  The file may be larger than
2GB.

   The alternate function '_tmpfile64_r' is a reentrant version.  The
argument REENT is a pointer to a reentrancy structure.

   Both tmpfile64 and _tmpfile64_r are only defined if
'__LARGE64_FILES' is defined.

Returns:
tmpfile64 normally returns a pointer to the temporary file.  If no
temporary file could be created, the result is NULL, and errno
records the reason for failure.

Portability:
tmpfile64 is a glibc extension.

   Supporting OS subroutines required: close, fstat, getpid,
isatty, lseek64, open64, read, sbrk, write.

   tmpfile64 also requires the global pointer environ.

