diff options
author | Yang Tse <yangsita@gmail.com> | 2010-01-18 20:22:04 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-01-18 20:22:04 +0000 |
commit | ccfe279117f197d2b3d0bb17bc754209024836a2 (patch) | |
tree | ccfd266b8c3b77c37da1515f49dd22b21a8a43bc /src | |
parent | 5b5ff41ef1ddd70864c55bdf47edd3f9c942cdc8 (diff) |
Constantine Sapuntzakis enhancements to make memory tracking log file writing
of messages atomic, on systems where an fwrite of a memory buffer is atomic.
Diffstat (limited to 'src')
-rw-r--r-- | src/writeenv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/writeenv.c b/src/writeenv.c index b432de69e..6ee0e948c 100644 --- a/src/writeenv.c +++ b/src/writeenv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -35,6 +35,10 @@ #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> +#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG) +#include "memdebug.h" +#endif + static const struct { const char * name; @@ -69,9 +73,7 @@ static void internalSetEnv(const char * name, char * value) #ifdef __riscos__ _kernel_setenv(name, value); #elif defined (CURLDEBUG) - extern FILE *curl_debuglogfile; - if (curl_debuglogfile) - fprintf (curl_debuglogfile, "ENV %s = %s\n", name, value); + curl_memlog("ENV %s = %s\n", name, value); #endif return; } |