From ad068e6351e5b9b5d3c5e050602941a2fd8cdde6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 8 May 2010 07:34:01 +0000 Subject: remove BLI_strnlen, use _strnlen as strnlen on windows. cant test on windows but from what I can tell this exists like _vsnprintf --- source/blender/blenlib/intern/BLI_dynstr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib/intern/BLI_dynstr.c') diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c index 5b61a86305b..4754d3bd8c3 100644 --- a/source/blender/blenlib/intern/BLI_dynstr.c +++ b/source/blender/blenlib/intern/BLI_dynstr.c @@ -39,6 +39,9 @@ #ifndef vsnprintf #define vsnprintf _vsnprintf #endif +#ifndef strnlen +#define strnlen _strnlen +#endif #endif /***/ @@ -83,7 +86,7 @@ void BLI_dynstr_append(DynStr *ds, const char *cstr) { void BLI_dynstr_nappend(DynStr *ds, const char *cstr, int len) { DynStrElem *dse= malloc(sizeof(*dse)); - int cstrlen= BLI_strnlen(cstr, len); + int cstrlen= strnlen(cstr, len); dse->str= malloc(cstrlen+1); memcpy(dse->str, cstr, cstrlen); -- cgit v1.2.3