Commit 0844c1ba authored by Steve Revill's avatar Steve Revill
Browse files

Made MemCheck stuff optional.

Detail:
  This component wouldn't build in the ROOL release because it required the
  MemCheck library which is a part of the Dr Smiths Toolkit (we can't
  release that). Unfortunately, Dr Smiths was installed in another build on
  the build machine so the dependency wasn't spotted.

  Now this feature is compiled conditionally upon the existence of the
  MemCheck_MEMCHECK symbol at build time.
Admin:
  Tested on IYONIX build machine with clean ROOL build environment.
Notes:
  Changes by Steve Revill.

Version 0.09. Tagged as 'Generic-0_09'
parent beb96023
/* (0.08)
/* (0.09)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2.
*
*/
#define Module_MajorVersion_CMHG 0.08
#define Module_MajorVersion_CMHG 0.09
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Jul 2000
#define Module_Date_CMHG 22 Sep 2007
#define Module_MajorVersion "0.08"
#define Module_Version 8
#define Module_MajorVersion "0.09"
#define Module_Version 9
#define Module_MinorVersion ""
#define Module_Date "20 Jul 2000"
#define Module_Date "22 Sep 2007"
#define Module_ApplicationDate2 "20-Jul-00"
#define Module_ApplicationDate4 "20-Jul-2000"
#define Module_ApplicationDate "22-Sep-07"
#define Module_FullVersion "0.08"
#define Module_ComponentName "Generic"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Fetchers/Generic"
#define Module_FullVersion "0.09"
#define Module_HelpVersion "0.09 (22 Sep 2007)"
#define Module_LibraryVersionInfo "0:9"
......@@ -32,7 +32,9 @@
#include "protocol.h"
#include "connect.h"
#include "MemCheck:MemCheck.h"
#ifdef MemCheck_MEMCHECK
# include "MemCheck:MemCheck.h"
#endif
#if CMHG_VERSION < 516
#define CMHG_CONST
......@@ -153,6 +155,7 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
session_init();
module_check_os_version();
#ifdef MemCheck_MEMCHECK
MemCheck_InitNoDebug();
MemCheck_SetQuitting(0,0);
MemCheck_RedirectToFilename("adfs::4.Trace.Genericmem");
......@@ -161,6 +164,7 @@ _kernel_oserror *module_init(CMHG_CONST char *cmd_tail, int podule_base, void *p
MemCheck_SetStoreMallocFunctions(1);
MemCheck_SetReportFrees(1);
MemCheck_SetChecking(0,0);
#endif
e = register_with_url();
if (e) {
......
......@@ -37,7 +37,9 @@
#include "URLstruct.h"
#include "URLclient.h"
#include "MemCheck:MemCheck.h"
#ifdef MemCheck_MEMCHECK
# include "MemCheck:MemCheck.h"
#endif
static void start_get_request(const char *url, char **host, int *port, char **uri, char **urlcopy);
......@@ -57,8 +59,10 @@ _kernel_oserror *generic_start(_kernel_swi_regs *r)
dprintf(("start_1", "Asking for url %s\n", url));
(void) flags;
#ifdef MemCheck_MEMCHECK
MemCheck_RegisterMiscBlock((void *) url,strlen(url)+1);
MemCheck_SetBlockAccess((void *) url,1,0);
#endif
/* Check to see if this session already exists before doing anything */
if (find_session(r->r[1])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment