diff options
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index db87d90..3131db1 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -5,16 +5,16 @@ #include "include/LibraryException.h" #include "include/cxx_semantics.h" -#ifdef _WIN32 -#pragma message "Using own strndup" -char * strndup(const char* str, size_t maxlen) { - size_t len = strnlen(str, maxlen); - char* dup = (char *)malloc(len + 1); - memcpy(dup, str, len); - dup[len] = 0; - return dup; -} -#endif +//#ifdef _WIN32 +//#pragma message "Using own strndup" +//char * strndup(const char* str, size_t maxlen) { +// size_t len = strnlen(str, maxlen); +// char* dup = (char *)malloc(len + 1); +// memcpy(dup, str, len); +// dup[len] = 0; +// return dup; +//} +//#endif using namespace nitrokey; |