| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef LIBNETDATA_PLATFORM_FWD_H |
| 4 | #define LIBNETDATA_PLATFORM_FWD_H |
| 5 | |
| 6 | #include "config.h" |
| 7 | |
| 8 | #if !defined(OS_LINUX) && !defined(OS_FREEBSD) && !defined(OS_MACOS) && !defined(OS_WINDOWS) |
| 9 | #if defined(_WIN32) |
| 10 | #define OS_WINDOWS 1 |
| 11 | #elif defined(__APPLE__) |
| 12 | #define OS_MACOS 1 |
| 13 | #elif defined(__FreeBSD__) |
| 14 | #define OS_FREEBSD 1 |
| 15 | #else |
| 16 | #define OS_LINUX 1 |
| 17 | #endif |
| 18 | #endif |
| 19 | |
| 20 | #if defined(OS_FREEBSD) |
| 21 | #include <pthread_np.h> |
| 22 | #define NETDATA_OS_TYPE "freebsd" |
| 23 | #elif defined(OS_MACOS) |
| 24 | #define NETDATA_OS_TYPE "macos" |
| 25 | #elif defined(OS_WINDOWS) |
| 26 | #define NETDATA_OS_TYPE "windows" |
| 27 | #else |
| 28 | #define NETDATA_OS_TYPE "linux" |
| 29 | #endif |
| 30 | |
| 31 | #endif // LIBNETDATA_PLATFORM_FWD_H |