File: cross_platform.h

package info (click to toggle)
python-xeddsa 0.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 884 kB
  • sloc: ansic: 5,442; python: 525; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef cross_platform_h
#define cross_platform_h

#if defined(_WIN32)
//  On Windows, the functions needs to explicitly be marked as import/export.
#   define IMPORT __declspec(dllimport)
#   define EXPORT __declspec(dllexport)
#elif defined(__APPLE__) || defined(__linux__) || defined(__unix__) || defined(_POSIX_VERSION)
//  On Apple, Linux, UNIX or POSIX (using gcc) no such marking is required.
#   define IMPORT
#   define EXPORT
#else
#   error "Unsupported operating system (neither UNIX nor Windows)."
#endif

#ifdef BUILD
#   define INTERFACE EXPORT
#else
#   define INTERFACE IMPORT
#endif

#endif