]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/CyaSSL/cyassl/ctaocrypt/visibility.h
a3b27812d482184abde49fe394f731ce529622e0
[freertos] / FreeRTOS-Plus / Source / CyaSSL / cyassl / ctaocrypt / visibility.h
1 /* visibility.h
2  *
3  * Copyright (C) 2006-2014 wolfSSL Inc.
4  *
5  * This file is part of CyaSSL.
6  *
7  * CyaSSL is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * CyaSSL is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 /* Visibility control macros */
23
24
25 #ifndef CTAO_CRYPT_VISIBILITY_H
26 #define CTAO_CRYPT_VISIBILITY_H
27
28
29 /* CYASSL_API is used for the public API symbols.
30         It either imports or exports (or does nothing for static builds)
31
32    CYASSL_LOCAL is used for non-API symbols (private).
33 */
34
35 #if defined(BUILDING_CYASSL)
36     #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
37         #define CYASSL_API   __attribute__ ((visibility("default")))
38         #define CYASSL_LOCAL __attribute__ ((visibility("hidden")))
39     #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
40         #define CYASSL_API   __global  
41         #define CYASSL_LOCAL __hidden
42     #elif defined(_MSC_VER)
43         #ifdef CYASSL_DLL
44             #define CYASSL_API extern __declspec(dllexport)
45         #else
46             #define CYASSL_API
47         #endif
48         #define CYASSL_LOCAL
49     #else
50         #define CYASSL_API
51         #define CYASSL_LOCAL
52     #endif /* HAVE_VISIBILITY */
53 #else /* BUILDING_CYASSL */
54     #if defined(_MSC_VER)
55         #ifdef CYASSL_DLL
56             #define CYASSL_API extern __declspec(dllimport)
57         #else
58             #define CYASSL_API
59         #endif
60         #define CYASSL_LOCAL
61     #else
62         #define CYASSL_API
63         #define CYASSL_LOCAL
64     #endif
65 #endif /* BUILDING_CYASSL */
66
67
68 #endif /* CTAO_CRYPT_VISIBILITY_H */
69