VirtualBox

Changeset 53716 in vbox for trunk/src/VBox/ExtPacks


Ignore:
Timestamp:
Jan 2, 2015 2:19:28 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97493
Message:

VBoxDTrace: Split out the ring-3 libc stuff from VBoxDTraceTypes.h and into VBoxDTraceLibCWrappers.h, fixing electric fence and duplicated strings.

Location:
trunk/src/VBox/ExtPacks/VBoxDTrace
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h

    r53714 r53716  
    394394 * Make life a little easier in ring-3.
    395395 */
    396 # include <iprt/alloca.h>
    397 # include <iprt/assert.h>
    398 # include <iprt/mem.h>
    399 # include <iprt/string.h>
    400 # include <iprt/time.h>
    401 # include <stdlib.h>
    402 # include <string.h>
    403 
    404 # undef gethrtime
    405 # define gethrtime()                RTTimeNanoTS()
    406 # undef strcasecmp
    407 # define strcasecmp(a_psz1, a_psz2) RTStrICmp(a_psz1, a_psz2)
    408 # undef strncasecmp
    409 # define strncasecmp(a_psz1, a_psz2, a_cch) RTStrNICmp(a_psz1, a_psz2, a_cch)
    410 # undef assert
    411 # define assert(expr)               Assert(expr)
    412 
    413 /* This isn't necessarily making things easier at first, but allows EF and
    414    such later on when things doesn't work right. */
    415 # undef malloc
    416 # define malloc(a_cbMem)            RTMemAlloc(a_cbMem)
    417 # undef realloc
    418 # define realloc(a_pvOld, a_cbMem)  RTMemRealloc(a_pvOld, a_cbMem)
    419 # undef calloc
    420 # define calloc(a_cbItem, a_cItems) RTMemAllocZ((size_t)(a_cbItem) * (a_cItems))
    421 # undef free
    422 # define free(a_pvMem)              RTMemFree(a_pvMem)
    423 # undef strdup
    424 # define strdup(a_psz)              RTStrDup(a_psz)
    425 # undef strndup
    426 # define strndup(a_psz, a_cchMax)   RTStrDupN(a_psz, a_cchMax)
    427 # undef strlcpy
    428 # define strlcpy(a_pszDst, a_pszSrc, a_cbDst) ((void)RTStrCopy(a_pszDst, a_cbDst, a_pszSrc))
    429396
    430397/* Replacement for strndup(), requires editing the code unfortunately. */
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c

    r53653 r53716  
    6969# include <iprt/string.h>
    7070
    71 # undef PATH_MAX
    72 # define PATH_MAX RTPATH_MAX
    73 
    74 # define getpid                                   RTProcSelf
    75 # define basename(a_pszPath)                  RTPathFilename(a_pszPath)
     71# include "VBoxDTraceLibCWrappers.h"
    7672
    7773# ifdef _MSC_VER
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/common/ctf/ctf_impl.h

    r53657 r53716  
    3939# include "../../../../../Runtime/include/internal/ldrELF64.h"
    4040# include <errno.h>
     41# include "VBoxDTraceLibCWrappers.h"
    4142#endif /* VBOX */
    4243#include <sys/ctf_api.h>
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_grammar.y

    r53654 r53716  
    3636#define LINK(l, r)      dt_node_link(l, r)
    3737#define DUP(s)          strdup(s)
     38
     39#ifdef VBOX
     40# define YYMALLOC RTMemAlloc
     41# define YYFREE   RTMemFree
     42#endif
     43
    3844
    3945%}
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_impl.h

    r53664 r53716  
    4141# include <dtrace.h>
    4242# include <errno.h>
     43# include "VBoxDTraceLibCWrappers.h"
    4344#endif /* VBOX*/
    4445
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_list.c

    r53653 r53716  
    4141#include <unistd.h>
    4242#include <assert.h>
     43#else
     44# include "VBoxDTraceLibCWrappers.h"
    4345#endif
    4446#include <dt_list.h>
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_regset.c

    r53653 r53716  
    3535#else  /* VBOX */
    3636# include <iprt/asm.h>
     37# include "VBoxDTraceLibCWrappers.h"
    3738#endif /* VBOX */
    3839
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette