libcertifier could "potentially" be built without the C standard library to provide a higher level of portability and flexibility to implementors. To do this, the functions would have to be overridden instead of the standard "C" ones.
See internal_headers/certifier/types.h
for more details.
libcertifier uses several functions that behave like <string.h>
memcpy()
, memset()
, and memcmp()
amongst others. They are abstracted to XMEMCPY()
, XMEMSET()
, and XMEMCMP()
respectively. And by default, they point to the C standard library versions. Defining STRING_USER
allows the user to provide their own hooks in types.h. For example, by default XMEMCPY()
is:
#define XMEMCPY(d,s,l) memcpy((d),(s),(l))
After defining IMPLEMENTOR_STRING you could do:
define XMEMCPY(d,s,l) my_memcpy((d),(s),(l))
Or if you prefer to avoid macros:
external void* my_memcpy(void* d, const void* s, size_t n);
to set libcertifier’s abstraction layer to point to your version my_memcpy().