3 * Copyright (C) 2006-2014 wolfSSL Inc.
5 * This file is part of CyaSSL.
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.
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.
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
22 /* Visibility control macros */
25 #ifndef CTAO_CRYPT_VISIBILITY_H
26 #define CTAO_CRYPT_VISIBILITY_H
29 /* CYASSL_API is used for the public API symbols.
30 It either imports or exports (or does nothing for static builds)
32 CYASSL_LOCAL is used for non-API symbols (private).
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)
44 #define CYASSL_API extern __declspec(dllexport)
52 #endif /* HAVE_VISIBILITY */
53 #else /* BUILDING_CYASSL */
56 #define CYASSL_API extern __declspec(dllimport)
65 #endif /* BUILDING_CYASSL */
68 #endif /* CTAO_CRYPT_VISIBILITY_H */