1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-22 09:38:56 +08:00

Merge pull request #56 from maximsmol/fix_memdbg_on_mac

sdk2013: Fix memdbg on Mac
This commit is contained in:
David Anderson 2019-02-24 10:29:13 -08:00 committed by GitHub
commit ab5972610c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -33,7 +33,11 @@
#include <wchar.h>
#endif
#include <string.h>
#if defined __APPLE__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include "commonmacros.h"
#include "memalloc.h"

View File

@ -16,6 +16,8 @@
#include "limits.h"
#if defined( OSX )
#if !defined( wcsdup )
inline wchar_t *wcsdup(const wchar_t *pString)
{
wchar_t *pMemory;
@ -31,6 +33,7 @@ inline wchar_t *wcsdup(const wchar_t *pString)
return NULL;
}
#endif
inline size_t strnlen(const char *s, size_t n)
{