X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2Fstdio%2Ftmpfile.c;h=1b3b4bab9b6886b7b5db8493825b34ca610d1618;hp=f3292349f08a9cbb3eb29832c73c1bc892faabf9;hb=c5d49235e09fbd58416f10dec2799e61cf3431c8;hpb=4c7c56442f6b3e08c17594dd4e8095fca3aec9cf diff --git a/platform/win32/functions/stdio/tmpfile.c b/platform/win32/functions/stdio/tmpfile.c index f329234..1b3b4ba 100644 --- a/platform/win32/functions/stdio/tmpfile.c +++ b/platform/win32/functions/stdio/tmpfile.c @@ -16,7 +16,9 @@ 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 ) { if(!tmpname_prefix[0]) { @@ -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); }