ONLP
Open Network Linux Platform APIs
onlp_porting.h
Go to the documentation of this file.
1 /************************************************************
2  * <bsn.cl fy=2014 v=onl>
3  *
4  * Copyright 2014, 2015 Big Switch Networks, Inc.
5  *
6  * Licensed under the Eclipse Public License, Version 1.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.eclipse.org/legal/epl-v10.html
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific
16  * language governing permissions and limitations under the
17  * License.
18  *
19  * </bsn.cl>
20  ************************************************************
21  *
22  *
23  *
24  ***********************************************************/
25 
26 /**************************************************************************/
35 #ifndef __ONLP_PORTING_H__
36 #define __ONLP_PORTING_H__
37 
38 
39 /* <auto.start.portingmacro(ALL).define> */
40 #if ONLP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS == 1
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <string.h>
44 #include <stdarg.h>
45 #include <memory.h>
46 #endif
47 
48 #ifndef ONLP_MEMSET
49  #if defined(GLOBAL_MEMSET)
50  #define ONLP_MEMSET GLOBAL_MEMSET
51  #elif ONLP_CONFIG_PORTING_STDLIB == 1
52  #define ONLP_MEMSET memset
53  #else
54  #error The macro ONLP_MEMSET is required but cannot be defined.
55  #endif
56 #endif
57 
58 #ifndef ONLP_MEMCPY
59  #if defined(GLOBAL_MEMCPY)
60  #define ONLP_MEMCPY GLOBAL_MEMCPY
61  #elif ONLP_CONFIG_PORTING_STDLIB == 1
62  #define ONLP_MEMCPY memcpy
63  #else
64  #error The macro ONLP_MEMCPY is required but cannot be defined.
65  #endif
66 #endif
67 
68 #ifndef ONLP_STRNCPY
69  #if defined(GLOBAL_STRNCPY)
70  #define ONLP_STRNCPY GLOBAL_STRNCPY
71  #elif ONLP_CONFIG_PORTING_STDLIB == 1
72  #define ONLP_STRNCPY strncpy
73  #else
74  #error The macro ONLP_STRNCPY is required but cannot be defined.
75  #endif
76 #endif
77 
78 #ifndef ONLP_STRLEN
79  #if defined(GLOBAL_STRLEN)
80  #define ONLP_STRLEN GLOBAL_STRLEN
81  #elif ONLP_CONFIG_PORTING_STDLIB == 1
82  #define ONLP_STRLEN strlen
83  #else
84  #error The macro ONLP_STRLEN is required but cannot be defined.
85  #endif
86 #endif
87 
88 /* <auto.end.portingmacro(ALL).define> */
89 
90 
91 #endif /* __ONLP_PORTING_H__ */
92 /* @} */