VirtualBox

Changeset 53697 in vbox for trunk


Ignore:
Timestamp:
Jan 2, 2015 12:42:29 PM (10 years ago)
Author:
vboxsync
Message:

VBoxDTrace: #undef string function before re-#defining them. (r74)

File:
1 edited

Legend:

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

    r53693 r53697  
    406406# include <iprt/string.h>
    407407# include <iprt/time.h>
     408# include <stdlib.h>
     409# include <string.h>
     410
     411# undef gethrtime
    408412# define gethrtime()                RTTimeNanoTS()
     413# undef strcasecmp
    409414# define strcasecmp(a_psz1, a_psz2) RTStrICmp(a_psz1, a_psz2)
     415# undef strncasecmp
    410416# define strncasecmp(a_psz1, a_psz2, a_cch) \
    411                                     RTStrNICmp(a_psz1, a_psz2, a_cch)
    412417# undef assert
    413418# define assert(expr)               Assert(expr)
     
    415420/* This isn't necessarily making things easier at first, but allows EF and
    416421   such later on when things doesn't work right. */
    417 # include <stdlib.h>
    418 # include <string.h>
     422# undef malloc
    419423# define malloc(a_cbMem)            RTMemAlloc(a_cbMem)
     424# undef realloc
    420425# define realloc(a_pvOld, a_cbMem)  RTMemRealloc(a_pvOld, a_cbMem)
     426# undef calloc
    421427# define calloc(a_cbItem, a_cItems) RTMemAllocZ((size_t)(a_cbItem) * (a_cItems))
     428# undef free
    422429# define free(a_pvMem)              RTMemFree(a_pvMem)
     430# undef strdup
    423431# define strdup(a_psz)              RTStrDup(a_psz)
     432# undef strndup
    424433# define strndup(a_psz, a_cchMax)   RTStrDupN(a_psz, a_cchMax)
     434# undef strlcpy
    425435# define strlcpy(a_pszDst, a_pszSrc, a_cbDst) ((void)RTStrCopy(a_pszDst, a_cbDst, a_pszSrc))
    426436
Note: See TracChangeset for help on using the changeset viewer.

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