open-cas-linux/casadm/ocf_env.h
Robert Baldyga 94e8ca09e0 Initial commit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-29 08:45:50 +01:00

28 lines
530 B
C

/*
* Copyright(c) 2012-2019 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#ifndef OCF_ENV_H_
#define OCF_ENV_H_
#include <string.h>
#include <stdlib.h>
#include "safeclib/safe_lib.h"
#define min(x, y) ({ x < y ? x : y; })
#define ENV_BUG_ON(cond) ({ if (cond) exit(1); })
/* *** STRING OPERATIONS *** */
#define env_memset memset_s
#define env_memcpy memcpy_s
#define env_memcmp memcmp_s
#define env_strnlen strnlen_s
#define env_strncmp strncmp
#define env_strncpy strncpy_s
#endif /* OCF_ENV_H_ */