Virgil IoT KIT
integration/platformio/include/config/platforms/linux/stdlib-config.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2019 Virgil Security, Inc.
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // (1) Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // (2) Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in
14 // the documentation and/or other materials provided with the
15 // distribution.
16 //
17 // (3) Neither the name of the copyright holder nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
22 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 // DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 // POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
34 
38 #ifndef VS_IOT_SDK_STDLIB_CONFIG_H
39 #define VS_IOT_SDK_STDLIB_CONFIG_H
40 
41 #include <assert.h>
42 #include <stdio.h>
43 #include <string.h>
44 #include <stdlib.h>
45 #include <time.h>
46 
47 #include "global-hal.h"
48 
50 #define VS_IOT_ASSERT assert
51 
53 #define VS_IOT_CALLOC calloc
54 
56 #define VS_IOT_FREE free
57 
59 #define VS_IOT_MALLOC malloc
60 
62 #define VS_IOT_MEMCMP memcmp
63 
65 #define VS_IOT_MEMCPY memcpy
66 
68 #define VS_IOT_MEMSET memset
69 
71 #define VS_IOT_MEMMOVE memmove
72 
74 #define VS_IOT_SNPRINTF snprintf
75 
77 #define VS_IOT_SPRINTF sprintf
78 
80 #define VS_IOT_STRCPY strcpy
81 
83 #define VS_IOT_STRNCPY strncpy
84 
86 #define VS_IOT_STRNCMP strncmp
87 
89 #define VS_IOT_STRSTR strstr
90 
92 #define VS_IOT_STRLEN strlen
93 
95 #define VS_IOT_VSNPRINTF vsnprintf
96 
98 #define VS_IOT_ASCTIME(TIME_T) asctime(localtime(&(TIME_T)))
99 
100 
101 #endif // VS_IOT_SDK_STDLIB_CONFIG_H
global-hal.h
Implementation for shared functions.