diff --git a/include/villas/atomic.h b/include/villas/atomic.h
index ea3a7f8a4..25c8de132 100644
--- a/include/villas/atomic.h
+++ b/include/villas/atomic.h
@@ -21,6 +21,7 @@
* along with this program. If not, see .
*********************************************************************************/
+#pragma once
#include "common.h"
@@ -38,4 +39,4 @@ typedef std::atomic atomic_state;
typedef _Atomic enum state atomic_state;
-#endif
+#endif /* __cplusplus */
diff --git a/include/villas/compat.h b/include/villas/compat.h
index c5a2275d5..1cac42afb 100644
--- a/include/villas/compat.h
+++ b/include/villas/compat.h
@@ -20,6 +20,8 @@
* along with this program. If not, see .
*********************************************************************************/
+#pragma once
+
#include
#ifdef __cplusplus
@@ -30,17 +32,9 @@ extern "C" {
size_t json_dumpb(const json_t *json, char *buffer, size_t size, size_t flags);
#endif
-#ifdef __cplusplus
-}
-#endif
-
#ifdef __MACH__
#include
- #ifdef __cplusplus
- extern "C"{
- #endif
-
#define le16toh(x) OSSwapLittleToHostInt16(x)
#define le32toh(x) OSSwapLittleToHostInt32(x)
#define le64toh(x) OSSwapLittleToHostInt64(x)
@@ -54,8 +48,8 @@ size_t json_dumpb(const json_t *json, char *buffer, size_t size, size_t flags);
#define htobe16(x) OSSwapHostToBigInt16(x)
#define htobe32(x) OSSwapHostToBigInt32(x)
#define htobe64(x) OSSwapHostToBigInt64(x)
-
- #ifdef __cplusplus
- }
- #endif
#endif /* __MACH__ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/villas/stats.h b/include/villas/stats.h
index 0d3660232..904023c62 100644
--- a/include/villas/stats.h
+++ b/include/villas/stats.h
@@ -21,8 +21,7 @@
* along with this program. If not, see .
*********************************************************************************/
-#ifndef _STATS_H_
-#define _STATS_H_
+#pragma once
#include
#include
@@ -90,7 +89,6 @@ void stats_print(struct stats *s, FILE *f, enum stats_format fmt, int verbose);
enum stats_id stats_lookup_id(const char *name);
-#endif /* _STATS_H_ */
#ifdef __cplusplus
}
#endif
diff --git a/include/villas/table.h b/include/villas/table.h
index 579903d38..18998b2c4 100644
--- a/include/villas/table.h
+++ b/include/villas/table.h
@@ -25,6 +25,8 @@
* @{
*/
+#pragma once
+
#ifdef __cplusplus
extern "C" {
#endif