FCGI_FILE *FCGI_fdopen(int fd, const char *mode) { #ifndef _WIN32 return FCGI_OpenFromFILE(fdopen(fd, mode)); #else return NULL; #endif }
FCGI_FILE *FCGI_popen(const char *cmd, const char *type) { FILE * file = popen(cmd, type); FCGI_FILE * fcgi_file = FCGI_OpenFromFILE(file); if (file && !fcgi_file) pclose(file); return fcgi_file; }
FCGI_FILE *FCGI_fdopen(int fd, const char *mode) { FILE * file = fdopen(fd, mode); FCGI_FILE * fcgi_file = FCGI_OpenFromFILE(file); if (file && !fcgi_file) fclose(file); return fcgi_file; }
/* *---------------------------------------------------------------------- * * FCGI_tmpfile -- * * Wrappers for function defined in H&S Section 15.16 * *---------------------------------------------------------------------- */ FCGI_FILE *FCGI_tmpfile(void) { FILE * file = tmpfile(); FCGI_FILE * fcgi_file = FCGI_OpenFromFILE(file); if (file && !fcgi_file) fclose(file); return fcgi_file; }
/* *---------------------------------------------------------------------- * * FCGI_fopen, FCGI_fclose, FCGI_fflush, FCGI_freopen -- * * Wrappers for functions defined in H&S Section 15.2 * *---------------------------------------------------------------------- */ FCGI_FILE *FCGI_fopen(const char *path, const char *mode) { FILE * file = fopen(path, mode); FCGI_FILE * fcgi_file = FCGI_OpenFromFILE(file); if (file && !fcgi_file) fclose(file); return fcgi_file; }
FCGI_FILE *FCGI_popen(const char *cmd, const char *type) { return FCGI_OpenFromFILE(popen(cmd, type)); }
FCGI_FILE *FCGI_fdopen(int fd, const char *mode) { return FCGI_OpenFromFILE(fdopen(fd, mode)); }
FCGI_FILE *FCGI_fopen(const char *path, const char *mode) { return FCGI_OpenFromFILE(fopen(path, mode)); }
/* *---------------------------------------------------------------------- * * FCGI_tmpfile -- * * Wrappers for function defined in H&S Section 15.16 * *---------------------------------------------------------------------- */ FCGI_FILE *FCGI_tmpfile(void) { return FCGI_OpenFromFILE(tmpfile()); }