mirror of
https://github.com/curl/curl.git
synced 2026-07-30 16:28:07 +03:00
Constantine Sapuntzakis enhancements to make memory tracking log file writing
of messages atomic, on systems where an fwrite of a memory buffer is atomic.
This commit is contained in:
parent
5b5ff41ef1
commit
ccfe279117
5 changed files with 96 additions and 69 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue