Remove building with NOCRYPTO option
[minix.git] / common / lib / libc / string / explicit_memset.c
blob5fbd2f76239ad5e9adb263ebd04bcc627ef38b0c
1 /* $NetBSD: explicit_memset.c,v 1.4 2014/06/24 16:39:39 drochner Exp $ */
3 /*
4 * Written by Matthias Drochner <drochner@NetBSD.org>.
5 * Public domain.
6 */
8 #if !defined(_KERNEL) && !defined(_STANDALONE)
9 #include "namespace.h"
10 #include <string.h>
11 #ifdef __weak_alias
12 __weak_alias(explicit_memset,_explicit_memset)
13 #endif
14 #define explicit_memset_impl __explicit_memset_impl
15 #else
16 #include <lib/libkern/libkern.h>
17 #endif
20 * The use of a volatile pointer guarantees that the compiler
21 * will not optimise the call away.
23 void *(* volatile explicit_memset_impl)(void *, int, size_t) = memset;
25 void *
26 explicit_memset(void *b, int c, size_t len)
29 return (*explicit_memset_impl)(b, c, len);