Home | History | Annotate | Line # | Download | only in sodium
      1  1.1  riastrad 
      2  1.1  riastrad #ifndef sodium_export_H
      3  1.1  riastrad #define sodium_export_H
      4  1.1  riastrad 
      5  1.1  riastrad #ifndef __GNUC__
      6  1.1  riastrad # ifdef __attribute__
      7  1.1  riastrad #  undef __attribute__
      8  1.1  riastrad # endif
      9  1.1  riastrad # define __attribute__(a)
     10  1.1  riastrad #endif
     11  1.1  riastrad 
     12  1.1  riastrad #ifdef SODIUM_STATIC
     13  1.1  riastrad # define SODIUM_EXPORT
     14  1.1  riastrad # define SODIUM_EXPORT_WEAK
     15  1.1  riastrad #else
     16  1.1  riastrad # if defined(_MSC_VER)
     17  1.1  riastrad #  ifdef SODIUM_DLL_EXPORT
     18  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllexport)
     19  1.1  riastrad #  else
     20  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllimport)
     21  1.1  riastrad #  endif
     22  1.1  riastrad # else
     23  1.1  riastrad #  if defined(__SUNPRO_C)
     24  1.1  riastrad #   ifndef __GNU_C__
     25  1.1  riastrad #    define SODIUM_EXPORT __attribute__ (visibility(__global))
     26  1.1  riastrad #   else
     27  1.1  riastrad #    define SODIUM_EXPORT __attribute__ __global
     28  1.1  riastrad #   endif
     29  1.1  riastrad #  elif defined(_MSG_VER)
     30  1.1  riastrad #   define SODIUM_EXPORT extern __declspec(dllexport)
     31  1.1  riastrad #  else
     32  1.1  riastrad #   define SODIUM_EXPORT __attribute__ ((visibility ("default")))
     33  1.1  riastrad #  endif
     34  1.1  riastrad # endif
     35  1.1  riastrad # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS)
     36  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak))
     37  1.1  riastrad # else
     38  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT
     39  1.1  riastrad # endif
     40  1.1  riastrad #endif
     41  1.1  riastrad 
     42  1.1  riastrad #ifndef CRYPTO_ALIGN
     43  1.1  riastrad # if defined(__INTEL_COMPILER) || defined(_MSC_VER)
     44  1.1  riastrad #  define CRYPTO_ALIGN(x) __declspec(align(x))
     45  1.1  riastrad # else
     46  1.1  riastrad #  define CRYPTO_ALIGN(x) __attribute__ ((aligned(x)))
     47  1.1  riastrad # endif
     48  1.1  riastrad #endif
     49  1.1  riastrad 
     50  1.1  riastrad #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
     51  1.1  riastrad #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
     52  1.1  riastrad 
     53  1.1  riastrad #endif
     54  1.1  riastrad 
     55  1.1  riastrad #ifndef sodium_export_H
     56  1.1  riastrad #define sodium_export_H
     57  1.1  riastrad 
     58  1.1  riastrad #ifndef __GNUC__
     59  1.1  riastrad # ifdef __attribute__
     60  1.1  riastrad #  undef __attribute__
     61  1.1  riastrad # endif
     62  1.1  riastrad # define __attribute__(a)
     63  1.1  riastrad #endif
     64  1.1  riastrad 
     65  1.1  riastrad #ifdef SODIUM_STATIC
     66  1.1  riastrad # define SODIUM_EXPORT
     67  1.1  riastrad # define SODIUM_EXPORT_WEAK
     68  1.1  riastrad #else
     69  1.1  riastrad # if defined(_MSC_VER)
     70  1.1  riastrad #  ifdef SODIUM_DLL_EXPORT
     71  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllexport)
     72  1.1  riastrad #  else
     73  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllimport)
     74  1.1  riastrad #  endif
     75  1.1  riastrad # else
     76  1.1  riastrad #  if defined(__SUNPRO_C)
     77  1.1  riastrad #   ifndef __GNU_C__
     78  1.1  riastrad #    define SODIUM_EXPORT __attribute__ (visibility(__global))
     79  1.1  riastrad #   else
     80  1.1  riastrad #    define SODIUM_EXPORT __attribute__ __global
     81  1.1  riastrad #   endif
     82  1.1  riastrad #  elif defined(_MSG_VER)
     83  1.1  riastrad #   define SODIUM_EXPORT extern __declspec(dllexport)
     84  1.1  riastrad #  else
     85  1.1  riastrad #   define SODIUM_EXPORT __attribute__ ((visibility ("default")))
     86  1.1  riastrad #  endif
     87  1.1  riastrad # endif
     88  1.1  riastrad # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS)
     89  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak))
     90  1.1  riastrad # else
     91  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT
     92  1.1  riastrad # endif
     93  1.1  riastrad #endif
     94  1.1  riastrad 
     95  1.1  riastrad #ifndef CRYPTO_ALIGN
     96  1.1  riastrad # if defined(__INTEL_COMPILER) || defined(_MSC_VER)
     97  1.1  riastrad #  define CRYPTO_ALIGN(x) __declspec(align(x))
     98  1.1  riastrad # else
     99  1.1  riastrad #  define CRYPTO_ALIGN(x) __attribute__ ((aligned(x)))
    100  1.1  riastrad # endif
    101  1.1  riastrad #endif
    102  1.1  riastrad 
    103  1.1  riastrad #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
    104  1.1  riastrad #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
    105  1.1  riastrad 
    106  1.1  riastrad #endif
    107  1.1  riastrad 
    108  1.1  riastrad #ifndef sodium_export_H
    109  1.1  riastrad #define sodium_export_H
    110  1.1  riastrad 
    111  1.1  riastrad #ifndef __GNUC__
    112  1.1  riastrad # ifdef __attribute__
    113  1.1  riastrad #  undef __attribute__
    114  1.1  riastrad # endif
    115  1.1  riastrad # define __attribute__(a)
    116  1.1  riastrad #endif
    117  1.1  riastrad 
    118  1.1  riastrad #ifdef SODIUM_STATIC
    119  1.1  riastrad # define SODIUM_EXPORT
    120  1.1  riastrad # define SODIUM_EXPORT_WEAK
    121  1.1  riastrad #else
    122  1.1  riastrad # if defined(_MSC_VER)
    123  1.1  riastrad #  ifdef SODIUM_DLL_EXPORT
    124  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllexport)
    125  1.1  riastrad #  else
    126  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllimport)
    127  1.1  riastrad #  endif
    128  1.1  riastrad # else
    129  1.1  riastrad #  if defined(__SUNPRO_C)
    130  1.1  riastrad #   ifndef __GNU_C__
    131  1.1  riastrad #    define SODIUM_EXPORT __attribute__ (visibility(__global))
    132  1.1  riastrad #   else
    133  1.1  riastrad #    define SODIUM_EXPORT __attribute__ __global
    134  1.1  riastrad #   endif
    135  1.1  riastrad #  elif defined(_MSG_VER)
    136  1.1  riastrad #   define SODIUM_EXPORT extern __declspec(dllexport)
    137  1.1  riastrad #  else
    138  1.1  riastrad #   define SODIUM_EXPORT __attribute__ ((visibility ("default")))
    139  1.1  riastrad #  endif
    140  1.1  riastrad # endif
    141  1.1  riastrad # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS)
    142  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak))
    143  1.1  riastrad # else
    144  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT
    145  1.1  riastrad # endif
    146  1.1  riastrad #endif
    147  1.1  riastrad 
    148  1.1  riastrad #ifndef CRYPTO_ALIGN
    149  1.1  riastrad # if defined(__INTEL_COMPILER) || defined(_MSC_VER)
    150  1.1  riastrad #  define CRYPTO_ALIGN(x) __declspec(align(x))
    151  1.1  riastrad # else
    152  1.1  riastrad #  define CRYPTO_ALIGN(x) __attribute__ ((aligned(x)))
    153  1.1  riastrad # endif
    154  1.1  riastrad #endif
    155  1.1  riastrad 
    156  1.1  riastrad #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
    157  1.1  riastrad #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
    158  1.1  riastrad 
    159  1.1  riastrad #endif
    160  1.1  riastrad 
    161  1.1  riastrad #ifndef sodium_export_H
    162  1.1  riastrad #define sodium_export_H
    163  1.1  riastrad 
    164  1.1  riastrad #ifndef __GNUC__
    165  1.1  riastrad # ifdef __attribute__
    166  1.1  riastrad #  undef __attribute__
    167  1.1  riastrad # endif
    168  1.1  riastrad # define __attribute__(a)
    169  1.1  riastrad #endif
    170  1.1  riastrad 
    171  1.1  riastrad #ifdef SODIUM_STATIC
    172  1.1  riastrad # define SODIUM_EXPORT
    173  1.1  riastrad # define SODIUM_EXPORT_WEAK
    174  1.1  riastrad #else
    175  1.1  riastrad # if defined(_MSC_VER)
    176  1.1  riastrad #  ifdef SODIUM_DLL_EXPORT
    177  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllexport)
    178  1.1  riastrad #  else
    179  1.1  riastrad #   define SODIUM_EXPORT __declspec(dllimport)
    180  1.1  riastrad #  endif
    181  1.1  riastrad # else
    182  1.1  riastrad #  if defined(__SUNPRO_C)
    183  1.1  riastrad #   ifndef __GNU_C__
    184  1.1  riastrad #    define SODIUM_EXPORT __attribute__ (visibility(__global))
    185  1.1  riastrad #   else
    186  1.1  riastrad #    define SODIUM_EXPORT __attribute__ __global
    187  1.1  riastrad #   endif
    188  1.1  riastrad #  elif defined(_MSG_VER)
    189  1.1  riastrad #   define SODIUM_EXPORT extern __declspec(dllexport)
    190  1.1  riastrad #  else
    191  1.1  riastrad #   define SODIUM_EXPORT __attribute__ ((visibility ("default")))
    192  1.1  riastrad #  endif
    193  1.1  riastrad # endif
    194  1.1  riastrad # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS)
    195  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak))
    196  1.1  riastrad # else
    197  1.1  riastrad #  define SODIUM_EXPORT_WEAK SODIUM_EXPORT
    198  1.1  riastrad # endif
    199  1.1  riastrad #endif
    200  1.1  riastrad 
    201  1.1  riastrad #ifndef CRYPTO_ALIGN
    202  1.1  riastrad # if defined(__INTEL_COMPILER) || defined(_MSC_VER)
    203  1.1  riastrad #  define CRYPTO_ALIGN(x) __declspec(align(x))
    204  1.1  riastrad # else
    205  1.1  riastrad #  define CRYPTO_ALIGN(x) __attribute__ ((aligned(x)))
    206  1.1  riastrad # endif
    207  1.1  riastrad #endif
    208  1.1  riastrad 
    209  1.1  riastrad #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
    210  1.1  riastrad #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
    211  1.1  riastrad 
    212  1.1  riastrad #endif
    213