X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2Fstdio%2Ftmpfile.c;h=d670f23e72f6a8f592f4ebc024667af811a3e374;hb=0d7d1cbcd86e772b4e97f426c81bc8a20b096224;hp=f3292349f08a9cbb3eb29832c73c1bc892faabf9;hpb=950d2e48042173a75188b0a2dbe219ed91ff47cf;p=pdclib.old diff --git a/platform/win32/functions/stdio/tmpfile.c b/platform/win32/functions/stdio/tmpfile.c index f329234..d670f23 100644 --- a/platform/win32/functions/stdio/tmpfile.c +++ b/platform/win32/functions/stdio/tmpfile.c @@ -16,8 +16,10 @@ static char tmpname_prefix[4] = {0, 0, 0, 0}; +extern const _PDCLIB_fileops_t _PDCLIB_fileops; extern void _PDCLIB_w32errno( void ); -struct _PDCLIB_file_t * tmpfile( void ) + +FILE* tmpfile( void ) { if(!tmpname_prefix[0]) { char namebuf[MAX_PATH+1]; @@ -67,7 +69,7 @@ struct _PDCLIB_file_t * tmpfile( void ) /* Set the file to delete on close */ DeleteFile(name); - FILE* fs = _PDCLIB_fdopen(fd, _PDCLIB_FWRITE | _PDCLIB_FRW, name); + FILE* fs = _PDCLIB_fvopen(((_PDCLIB_fd_t){fd}), &_PDCLIB_fileops, _PDCLIB_FWRITE | _PDCLIB_FRW, name); if(!fs) { CloseHandle(fd); }