Warning, file /include/sodium/export.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002 #ifndef sodium_export_H
0003 #define sodium_export_H
0004
0005 #include <stddef.h>
0006 #include <stdint.h>
0007 #include <limits.h>
0008
0009 #if !defined(__clang__) && !defined(__GNUC__)
0010 # ifdef __attribute__
0011 # undef __attribute__
0012 # endif
0013 # define __attribute__(a)
0014 #endif
0015
0016 #ifdef SODIUM_STATIC
0017 # define SODIUM_EXPORT
0018 # define SODIUM_EXPORT_WEAK
0019 #else
0020 # if defined(_MSC_VER)
0021 # ifdef SODIUM_DLL_EXPORT
0022 # define SODIUM_EXPORT __declspec(dllexport)
0023 # else
0024 # define SODIUM_EXPORT __declspec(dllimport)
0025 # endif
0026 # else
0027 # if defined(__SUNPRO_C)
0028 # ifndef __GNU_C__
0029 # define SODIUM_EXPORT __attribute__ (visibility(__global))
0030 # else
0031 # define SODIUM_EXPORT __attribute__ __global
0032 # endif
0033 # elif defined(_MSG_VER)
0034 # define SODIUM_EXPORT extern __declspec(dllexport)
0035 # else
0036 # define SODIUM_EXPORT __attribute__ ((visibility ("default")))
0037 # endif
0038 # endif
0039 # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS)
0040 # define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak))
0041 # else
0042 # define SODIUM_EXPORT_WEAK SODIUM_EXPORT
0043 # endif
0044 #endif
0045
0046 #ifndef CRYPTO_ALIGN
0047 # if defined(__INTEL_COMPILER) || defined(_MSC_VER)
0048 # define CRYPTO_ALIGN(x) __declspec(align(x))
0049 # else
0050 # define CRYPTO_ALIGN(x) __attribute__ ((aligned(x)))
0051 # endif
0052 #endif
0053
0054 #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
0055 #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
0056
0057 #endif