mempcpy function not defined on MACOSX

Compiler issues (Intel compiler, mpicc, etc.), data libraries and everything needed to get Serpent running is discussed here
Post Reply
alain_hebert
Posts: 4
Joined: Thu Feb 14, 2013 5:25 pm
Security question 1: No
Security question 2: 92

mempcpy function not defined on MACOSX

Post by alain_hebert » Tue Apr 01, 2014 12:49 am

Function mempcpy is not defined on MACOSX. It is possible to wrap memcpy in order to emulate mempcpy. Here is a proposal:

#include <string.h>
void *mempcpy(void *dst, const void *src, size_t len)
{
return (char *) memcpy(dst, src, len) + len;

}

User avatar
Jaakko Leppänen
Site Admin
Posts: 2167
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: mempcpy function not defined on MACOSX

Post by Jaakko Leppänen » Tue Apr 01, 2014 1:11 pm

This function is used only in subroutine dividecgnsface.c in Serpent 2, and it can actually be replaced with memcpy. I will fix this in the next update.
- Jaakko

Post Reply