File tree Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * \file utils.h
3
+ *
4
+ * \brief Mbed Crypto internal utilities
5
+ *
6
+ * This file contains the macros and functions useful for the development and
7
+ * testing of Mbed Crypto.
8
+ *
9
+ */
10
+ /*
11
+ * Copyright (C) 2018, ARM Limited, All Rights Reserved
12
+ * SPDX-License-Identifier: Apache-2.0
13
+ *
14
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
15
+ * not use this file except in compliance with the License.
16
+ * You may obtain a copy of the License at
17
+ *
18
+ * http://www.apache.org/licenses/LICENSE-2.0
19
+ *
20
+ * Unless required by applicable law or agreed to in writing, software
21
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ * See the License for the specific language governing permissions and
24
+ * limitations under the License.
25
+ *
26
+ * This file is part of mbed TLS (https://tls.mbed.org)
27
+ */
28
+
29
+ #ifndef MC_UTILS_H
30
+ #define MC_UTILS_H
31
+
32
+ /* A compile-time constant with the value 0. If `const_expr` is not a
33
+ * compile-time constant with a nonzero value, cause a compile-time error. */
34
+ #define STATIC_ASSERT_EXPR ( const_expr ) \
35
+ ( 0 && sizeof( struct { int STATIC_ASSERT : 1 - 2 * ! ( const_expr ); } ) )
36
+
37
+ #endif /* MC_UTILS_H */
Original file line number Diff line number Diff line change 23
23
#include "mbedtls/memory_buffer_alloc.h"
24
24
#endif
25
25
26
+ #include "utils.h"
27
+
26
28
#ifdef _MSC_VER
27
29
#include <basetsd.h>
28
30
typedef UINT8 uint8_t;
@@ -180,10 +182,6 @@ typedef struct data_tag
180
182
#define IS_ARRAY_NOT_POINTER( arg ) 1
181
183
#endif
182
184
183
- /* A compile-time constant with the value 0. If `const_expr` is not a
184
- * compile-time constant with a nonzero value, cause a compile-time error. */
185
- #define STATIC_ASSERT_EXPR( const_expr ) \
186
- ( 0 && sizeof( struct { int STATIC_ASSERT : 1 - 2 * ! ( const_expr ); } ) )
187
185
/* Return the scalar value `value` (possibly promoted). This is a compile-time
188
186
* constant if `value` is. `condition` must be a compile-time constant.
189
187
* If `condition` is false, arrange to cause a compile-time error. */
You can’t perform that action at this time.
0 commit comments