1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-22 17:47:38 +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> #include <wchar.h>
#endif #endif
#include <string.h> #include <string.h>
#if defined __APPLE__
#include <stdlib.h>
#else
#include <malloc.h> #include <malloc.h>
#endif
#include "commonmacros.h" #include "commonmacros.h"
#include "memalloc.h" #include "memalloc.h"

View File

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