From ccfe279117f197d2b3d0bb17bc754209024836a2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 18 Jan 2010 20:22:04 +0000 Subject: Constantine Sapuntzakis enhancements to make memory tracking log file writing of messages atomic, on systems where an fwrite of a memory buffer is atomic. --- src/writeenv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/writeenv.c') 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, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , 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 +#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; } -- cgit v1.2.3