From ec09aaaa071d17f84b70e7bf07d3d0ea5139fffe Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 9 Feb 2023 02:21:29 -0800 Subject: [PATCH] lib: add various include guards --- lib/mks-device.h | 4 ++++ lib/mks-init.h | 4 ++++ lib/mks-screen.h | 4 ++++ lib/mks-session.h | 4 ++++ lib/mks-types.h | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/lib/mks-device.h b/lib/mks-device.h index 4976928..c25c368 100644 --- a/lib/mks-device.h +++ b/lib/mks-device.h @@ -21,6 +21,10 @@ #pragma once +#if !defined(MKS_INSIDE) && !defined(MKS_COMPILATION) +# error "Only can be included directly." +#endif + #include #include "mks-types.h" diff --git a/lib/mks-init.h b/lib/mks-init.h index c00beea..f724ba1 100644 --- a/lib/mks-init.h +++ b/lib/mks-init.h @@ -21,6 +21,10 @@ #pragma once +#if !defined(MKS_INSIDE) && !defined(MKS_COMPILATION) +# error "Only can be included directly." +#endif + #include #include "mks-version-macros.h" diff --git a/lib/mks-screen.h b/lib/mks-screen.h index 898bb1a..4f41343 100644 --- a/lib/mks-screen.h +++ b/lib/mks-screen.h @@ -21,6 +21,10 @@ #pragma once +#if !defined(MKS_INSIDE) && !defined(MKS_COMPILATION) +# error "Only can be included directly." +#endif + #include #include "mks-device.h" diff --git a/lib/mks-session.h b/lib/mks-session.h index be255fe..83f074c 100644 --- a/lib/mks-session.h +++ b/lib/mks-session.h @@ -21,6 +21,10 @@ #pragma once +#if !defined(MKS_INSIDE) && !defined(MKS_COMPILATION) +# error "Only can be included directly." +#endif + #include #include "mks-types.h" diff --git a/lib/mks-types.h b/lib/mks-types.h index 6d27df6..02a6e02 100644 --- a/lib/mks-types.h +++ b/lib/mks-types.h @@ -21,6 +21,10 @@ #pragma once +#if !defined(MKS_INSIDE) && !defined(MKS_COMPILATION) +# error "Only can be included directly." +#endif + #include G_BEGIN_DECLS