tmpfile(), tmpfile64()

create temporary binary file 

Function


SYNOPSIS

#include <stdio.h>

FILE *tmpfile(void);

FILE *tmpfile64(void);


DESCRIPTION

The tmpfile() function creates a temporary binary file that is automatically removed when it is closed or at program termination. The file is opened as in fopen() for update, in binary mode (that is, "wb+").

The tmpfile64() function is identical to the tmpfile() function except that the file is created with the O_LARGFILE flag set. The tmpfile64() function is a part of the large file extensions.


PARAMETERS

None.


RETURN VALUES

The tmpfile() or tmpfile64() functions returns a pointer to the stream of the file that it created. If the file cannot be created, tmpfile() or tmpfile64() returns a null pointer.


CONFORMANCE

ANSI/ISO 9899-1990.

tmpfile64(): Large File Specification, revision 1.5.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

If the temporary file is in text mode, then linefeed is translated into carriage-return linefeed on output. If the temporary file is open in binary mode, then no such translation occurs. The NuTCRACKER Platform initially opens the file in binary mode.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
fopen(), tempnam(), tmpnam()

Miscellaneous:
lf64


PTC MKS Toolkit 10.3 Documentation Build 39.