Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of wolfSSL by
wolfssl/wolfcrypt/visibility.h@7:481bce714567, 2017-05-02 (annotated)
- Committer:
- wolfSSL
- Date:
- Tue May 02 08:44:47 2017 +0000
- Revision:
- 7:481bce714567
wolfSSL3.10.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 7:481bce714567 | 1 | /* visibility.h |
wolfSSL | 7:481bce714567 | 2 | * |
wolfSSL | 7:481bce714567 | 3 | * Copyright (C) 2006-2016 wolfSSL Inc. |
wolfSSL | 7:481bce714567 | 4 | * |
wolfSSL | 7:481bce714567 | 5 | * This file is part of wolfSSL. |
wolfSSL | 7:481bce714567 | 6 | * |
wolfSSL | 7:481bce714567 | 7 | * wolfSSL is free software; you can redistribute it and/or modify |
wolfSSL | 7:481bce714567 | 8 | * it under the terms of the GNU General Public License as published by |
wolfSSL | 7:481bce714567 | 9 | * the Free Software Foundation; either version 2 of the License, or |
wolfSSL | 7:481bce714567 | 10 | * (at your option) any later version. |
wolfSSL | 7:481bce714567 | 11 | * |
wolfSSL | 7:481bce714567 | 12 | * wolfSSL is distributed in the hope that it will be useful, |
wolfSSL | 7:481bce714567 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
wolfSSL | 7:481bce714567 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
wolfSSL | 7:481bce714567 | 15 | * GNU General Public License for more details. |
wolfSSL | 7:481bce714567 | 16 | * |
wolfSSL | 7:481bce714567 | 17 | * You should have received a copy of the GNU General Public License |
wolfSSL | 7:481bce714567 | 18 | * along with this program; if not, write to the Free Software |
wolfSSL | 7:481bce714567 | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
wolfSSL | 7:481bce714567 | 20 | */ |
wolfSSL | 7:481bce714567 | 21 | |
wolfSSL | 7:481bce714567 | 22 | |
wolfSSL | 7:481bce714567 | 23 | /* Visibility control macros */ |
wolfSSL | 7:481bce714567 | 24 | |
wolfSSL | 7:481bce714567 | 25 | #ifndef WOLF_CRYPT_VISIBILITY_H |
wolfSSL | 7:481bce714567 | 26 | #define WOLF_CRYPT_VISIBILITY_H |
wolfSSL | 7:481bce714567 | 27 | |
wolfSSL | 7:481bce714567 | 28 | |
wolfSSL | 7:481bce714567 | 29 | /* for compatibility and so that fips is using same name of macro @wc_fips */ |
wolfSSL | 7:481bce714567 | 30 | #ifdef HAVE_FIPS |
wolfSSL | 7:481bce714567 | 31 | #include <cyassl/ctaocrypt/visibility.h> |
wolfSSL | 7:481bce714567 | 32 | #define WOLFSSL_API CYASSL_API |
wolfSSL | 7:481bce714567 | 33 | #define WOLFSSL_LOCAL CYASSL_LOCAL |
wolfSSL | 7:481bce714567 | 34 | #else |
wolfSSL | 7:481bce714567 | 35 | |
wolfSSL | 7:481bce714567 | 36 | /* WOLFSSL_API is used for the public API symbols. |
wolfSSL | 7:481bce714567 | 37 | It either imports or exports (or does nothing for static builds) |
wolfSSL | 7:481bce714567 | 38 | |
wolfSSL | 7:481bce714567 | 39 | WOLFSSL_LOCAL is used for non-API symbols (private). |
wolfSSL | 7:481bce714567 | 40 | */ |
wolfSSL | 7:481bce714567 | 41 | |
wolfSSL | 7:481bce714567 | 42 | #if defined(BUILDING_WOLFSSL) |
wolfSSL | 7:481bce714567 | 43 | #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY |
wolfSSL | 7:481bce714567 | 44 | #define WOLFSSL_API __attribute__ ((visibility("default"))) |
wolfSSL | 7:481bce714567 | 45 | #define WOLFSSL_LOCAL __attribute__ ((visibility("hidden"))) |
wolfSSL | 7:481bce714567 | 46 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
wolfSSL | 7:481bce714567 | 47 | #define WOLFSSL_API __global |
wolfSSL | 7:481bce714567 | 48 | #define WOLFSSL_LOCAL __hidden |
wolfSSL | 7:481bce714567 | 49 | #elif defined(_MSC_VER) || defined(__MINGW32__) |
wolfSSL | 7:481bce714567 | 50 | #if defined(WOLFSSL_DLL) |
wolfSSL | 7:481bce714567 | 51 | #define WOLFSSL_API __declspec(dllexport) |
wolfSSL | 7:481bce714567 | 52 | #else |
wolfSSL | 7:481bce714567 | 53 | #define WOLFSSL_API |
wolfSSL | 7:481bce714567 | 54 | #endif |
wolfSSL | 7:481bce714567 | 55 | #define WOLFSSL_LOCAL |
wolfSSL | 7:481bce714567 | 56 | #else |
wolfSSL | 7:481bce714567 | 57 | #define WOLFSSL_API |
wolfSSL | 7:481bce714567 | 58 | #define WOLFSSL_LOCAL |
wolfSSL | 7:481bce714567 | 59 | #endif /* HAVE_VISIBILITY */ |
wolfSSL | 7:481bce714567 | 60 | #else /* BUILDING_WOLFSSL */ |
wolfSSL | 7:481bce714567 | 61 | #if defined(_MSC_VER) || defined(__MINGW32__) |
wolfSSL | 7:481bce714567 | 62 | #if defined(WOLFSSL_DLL) |
wolfSSL | 7:481bce714567 | 63 | #define WOLFSSL_API __declspec(dllimport) |
wolfSSL | 7:481bce714567 | 64 | #else |
wolfSSL | 7:481bce714567 | 65 | #define WOLFSSL_API |
wolfSSL | 7:481bce714567 | 66 | #endif |
wolfSSL | 7:481bce714567 | 67 | #define WOLFSSL_LOCAL |
wolfSSL | 7:481bce714567 | 68 | #else |
wolfSSL | 7:481bce714567 | 69 | #define WOLFSSL_API |
wolfSSL | 7:481bce714567 | 70 | #define WOLFSSL_LOCAL |
wolfSSL | 7:481bce714567 | 71 | #endif |
wolfSSL | 7:481bce714567 | 72 | #endif /* BUILDING_WOLFSSL */ |
wolfSSL | 7:481bce714567 | 73 | |
wolfSSL | 7:481bce714567 | 74 | #endif /* HAVE_FIPS */ |
wolfSSL | 7:481bce714567 | 75 | #endif /* WOLF_CRYPT_VISIBILITY_H */ |
wolfSSL | 7:481bce714567 | 76 | |
wolfSSL | 7:481bce714567 | 77 |