⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmpfile64.c

📁 用于嵌入式Linux系统的标准C的库函数
💻 C
字号:
/*FUNCTION<<tmpfile64>>---create a large temporary fileINDEX	tmpfile64INDEX	_tmpfile64_rANSI_SYNOPSIS	#include <stdio.h>	FILE *tmpfile64(void);	FILE *_tmpfile64_r(void *<[reent]>);TRAD_SYNOPSIS	#include <stdio.h>	FILE *tmpfile64();	FILE *_tmpfile64_r(<[reent]>)	char *<[reent]>;DESCRIPTIONCreate a large temporary file (a file which will be deleted automatically),using a name generated by <<tmpnam>>.  The temporary file is opened withthe mode <<"wb+">>, permitting you to read and write anywhere in itas a binary file (without any data transformations the host system mayperform for text files).  The file may be larger than 2GB.The alternate function <<_tmpfile64_r>> is a reentrant version.  Theargument <[reent]> is a pointer to a reentrancy structure.Both <<tmpfile64>> and <<_tmpfile64_r>> are only defined if __LARGE64_FILESis defined.RETURNS<<tmpfile64>> normally returns a pointer to the temporary file.  If notemporary 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>>.*/#include <stdio.h>#include <errno.h>#ifdef __LARGE64_FILESFILE *_DEFUN (_tmpfile64_r, (ptr),	struct _reent *ptr){  FILE *fp;  int e;  char *f;  char buf[L_tmpnam];  if ((f = _tmpnam_r (ptr, buf)) == NULL)    return NULL;  fp = _fopen64_r (ptr, (const char *)f, "wb+");  e = ptr->_errno;  _CAST_VOID _remove_r (ptr, f);  ptr->_errno = e;  return fp;}#ifndef _REENT_ONLYFILE *_DEFUN_VOID (tmpfile64){  return _tmpfile64_r (_REENT);}#endif#endif /* __LARGE64_FILES */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -