API参考
载入中...
搜索中...
未找到
bsl_err_internal.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef BSL_ERR_INTERNAL_H
17#define BSL_ERR_INTERNAL_H
18
19#include <stdint.h>
20#include "hitls_build.h"
21#include "bsl_err.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#ifdef HITLS_BSL_ERR
28
42void BSL_ERR_PushError(int32_t err, const char *file, uint32_t lineNo);
43
53#define BSL_ERR_PUSH_ERROR(e) BSL_ERR_PushError((e), __FILENAME__, __LINE__)
54
55#define BSL_ERR_SET_MARK() (void)BSL_ERR_SetMark()
56
57#define BSL_ERR_POP_TO_MARK() (void)BSL_ERR_PopToMark()
58
59#else
60
61#define BSL_ERR_PUSH_ERROR(e)
62
63#define BSL_ERR_SET_MARK()
64
65#define BSL_ERR_POP_TO_MARK()
66
67#endif /* HITLS_BSL_ERR */
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif // BSL_ERR_INTERNAL_H