Commit 90080da5 authored by Yang Tse's avatar Yang Tse
Browse files

curl tool: re-enable MemoryTracking capability on 'src' subdirectory files.

Use same preprocessor logic for curl tool MemoryTracking activation in source
files located in 'src' subdirectory as the one used for libcurl sources.
parent 0216e517
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2011, 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
@@ -19,11 +19,12 @@
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "setup.h"

#include "curlutil.h"

#include "memdebug.h" /* keep this as LAST include */

#if defined(WIN32) && !defined(MSDOS)

struct timeval cutil_tvnow(void)
+4 −5
Original line number Diff line number Diff line
#ifndef __CURL_SRC_UTIL_H
#define __CURL_SRC_UTIL_H
#ifndef HEADER_CURL_SRC_UTIL_H
#define HEADER_CURL_SRC_UTIL_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2011, 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
@@ -21,7 +21,6 @@
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "setup.h"


@@ -45,5 +44,5 @@ double cutil_tvdiff_secs(struct timeval t1, struct timeval t2);
long cutil_tvlong(struct timeval t1);


#endif  /* __CURL_SRC_UTIL_H */
#endif  /* HEADER_CURL_SRC_UTIL_H */
+20 −21
Original line number Diff line number Diff line
@@ -19,10 +19,6 @@
 * KIND, either express or implied.
 *
 ***************************************************************************/

/* This file is a reimplementation of the previous one, due to license
   problems. */

#include "setup.h"

#ifndef HAVE_GETPASS_R
@@ -32,8 +28,6 @@
#include <unistd.h>
#endif

#include "getpass.h"

#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -45,17 +39,30 @@
#endif
#endif

/* The last #include file should be: */
#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
#include "memdebug.h"
#endif

#ifdef __VMS
/* VMS implementation */
#  include descrip
#  include starlet
#  include iodef
/* #include iosbdef */
#endif

#ifdef WIN32
#  include <conio.h>
#endif

#ifdef NETWARE
#  ifdef __NOVELL_LIBC__
#    include <screen.h>
#  else
#    include <nwconio.h>
#  endif
#endif

#include "getpass.h"

#include "memdebug.h" /* keep this as LAST include */

#ifdef __VMS
/* VMS implementation */
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
  long sts;
@@ -91,12 +98,6 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#define DONE
#endif /* __VMS */


#ifdef WIN32
/* Windows implementation */
#include <conio.h>
#endif

#ifdef __SYMBIAN32__
#define getch() getchar()
#endif
@@ -136,13 +137,11 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#ifdef NETWARE
/* NetWare implementation */
#ifdef __NOVELL_LIBC__
#include <screen.h>
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
  return getpassword(prompt, buffer, buflen);
}
#else
#include <nwconio.h>
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
  size_t i = 0;
+6 −4
Original line number Diff line number Diff line
#ifndef __GETPASS_H
#define __GETPASS_H
#ifndef HEADER_CURL_GETPASS_H
#define HEADER_CURL_GETPASS_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2011, 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
@@ -21,6 +21,8 @@
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "setup.h"

#ifndef HAVE_GETPASS_R
/* If there's a system-provided function named like this, we trust it is
   also found in one of the standard headers. */
@@ -31,4 +33,4 @@
char* getpass_r(const char *prompt, char* buffer, size_t buflen );
#endif

#endif
#endif /* HEADER_CURL_GETPASS_H */
+1 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "setup.h"

#ifdef HAVE_PWD_H
@@ -34,9 +33,7 @@

#include "homedir.h"

#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
#include "memdebug.h"
#endif
#include "memdebug.h" /* keep this as LAST include */

static
char *GetEnv(const char *variable, char do_expand)
Loading