Bit.ASICmon-c/inc/getosname.hpp

24 lines
437 B
C++
Raw Normal View History

2023-03-22 09:45:51 +08:00
#ifndef BIT_GETOSNAME_H
#define BIT_GETOSNAME_H
2023-03-21 21:35:50 +08:00
#include <string>
std::string getOsName() {
#ifdef _WIN64
2023-03-22 09:45:51 +08:00
return "mustdie64";
2023-03-21 21:35:50 +08:00
#elif _WIN32
2023-03-22 09:45:51 +08:00
return "mustdie32";
2023-03-21 21:35:50 +08:00
#elif __APPLE__ || __MACH__
2023-03-22 09:45:51 +08:00
return "osx";
2023-03-21 21:35:50 +08:00
#elif __linux__
return "linux";
#elif __FreeBSD__
return "freebsd";
#elif __unix || __unix__
return "unix";
#else
return "other";
#endif
}
#endif