summaryrefslogtreecommitdiff
path: root/lib/memdebug.c
diff options
context:
space:
mode:
authorJames Housley <jim@thehousleys.net>2007-06-28 11:11:29 +0000
committerJames Housley <jim@thehousleys.net>2007-06-28 11:11:29 +0000
commitaed0cc6f2a9a7fdaae08ad6700687f7200b4ebaa (patch)
tree5ef37d17b276e70f2b924243d6058d4681b8d02a /lib/memdebug.c
parentd500c468fc99816a7bdd817404aa489b065ae64d (diff)
downloadcurl-aed0cc6f2a9a7fdaae08ad6700687f7200b4ebaa.tar.gz
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().
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r--lib/memdebug.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 582387cf9..2eb4c5afb 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -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;