mirror of
https://github.com/curl/curl.git
synced 2026-07-24 08:47:50 +03:00
Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMS
file.c, but the debug interface was missing. This adds the routines needed to make the memory debuging work for fdopen().
This commit is contained in:
parent
d500c468fc
commit
aed0cc6f2a
4 changed files with 16 additions and 3 deletions
|
|
@ -280,6 +280,16 @@ FILE *curl_fopen(const char *file, const char *mode,
|
|||
return res;
|
||||
}
|
||||
|
||||
FILE *curl_fdopen(int filedes, const char *mode,
|
||||
int line, const char *source)
|
||||
{
|
||||
FILE *res=(fdopen)(filedes, mode);
|
||||
if(logfile)
|
||||
fprintf(logfile, "FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n",
|
||||
source, line, filedes, mode, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
int curl_fclose(FILE *file, int line, const char *source)
|
||||
{
|
||||
int res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue