Conscience Core
Util
os.h
Go to the documentation of this file.
1
#ifndef util_os_H
2
#define util_os_H
3
4
#include <string>
5
6
#if defined(_WIN32)
7
# pragma message("OS = WINDOWS")
8
#define CSC_OS_WINDOWS 1
9
#elif defined(__APPLE__)
10
#define CSC_OS_MACOS 1
11
#elif defined(__linux__)
12
#define CSC_OS_LINUX 1
13
#else
14
#define CSC_OS_UNKNOWN 1
15
#endif
16
17
#if CSC_OS_WINDOWS == 1
18
#define CSC_USER_DLL_EXPORT __declspec(dllexport)
19
#else
20
#define CSC_USER_DLL_EXPORT
21
#endif
22
23
// very important: on Windows, DLL cannot export a lot of symbols. It is possible to export all but it includes headers public members, hence a lot of potentially useless symbols
24
// we choose here, as the best practice commands us, to put on
25
#if CSC_OS_WINDOWS == 1
26
#if defined(CSC_CORE_BUILD)
27
#define CSC_DLL_IMPORTEXPORT __declspec(dllexport)
28
#elif defined(CSC_CORE_DLL)
29
#define CSC_DLL_IMPORTEXPORT __declspec(dllimport)
30
#else
31
#define CSC_DLL_IMPORTEXPORT
32
#endif
33
#else
34
#define CSC_DLL_IMPORTEXPORT
35
#endif
36
37
std::string
getOSString
();
38
39
#endif
getOSString
std::string getOSString()
Definition:
os.cpp:3
Generated by
1.8.17