From a8ea62a567c385b6db526b0f34748314b0122ca7 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 18 Jun 2020 17:36:01 +0200 Subject: Add guards against multiple inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inspired by a patch from Félix Piédallu that did the same thing using #pragma. --- src/keyfileutils.h | 6 ++++++ src/mimeutils.h | 5 +++++ src/validate.h | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/src/keyfileutils.h b/src/keyfileutils.h index d30e07a..277bd12 100644 --- a/src/keyfileutils.h +++ b/src/keyfileutils.h @@ -20,6 +20,9 @@ * USA. */ +#ifndef __DFU_KEYFILEUTILS_H__ +#define __DFU_KEYFILEUTILS_H__ + #include #define GROUP_DESKTOP_ENTRY "Desktop Entry" @@ -51,3 +54,6 @@ void dfu_key_file_remove_list (GKeyFile *keyfile, gboolean dfu_key_file_to_path (GKeyFile *keyfile, const char *path, GError **error); + +#endif /* __DFU_KEYFILEUTILS_H__ */ + diff --git a/src/mimeutils.h b/src/mimeutils.h index a866f6d..268dc0b 100644 --- a/src/mimeutils.h +++ b/src/mimeutils.h @@ -22,6 +22,9 @@ * USA. */ +#ifndef __DFU_MIMEUTILS_H__ +#define __DFU_MIMEUTILS_H__ + #include typedef enum { @@ -32,3 +35,5 @@ typedef enum { MimeUtilsValidity mu_mime_type_is_valid (const char *mime_type, char **error); + +#endif /* __DFU_MIMEUTILS_H__ */ diff --git a/src/validate.h b/src/validate.h index 8f3b741..8dd5594 100644 --- a/src/validate.h +++ b/src/validate.h @@ -25,6 +25,9 @@ * USA. */ +#ifndef __DFU_VALIDATE_H__ +#define __DFU_VALIDATE_H__ + #include #define CURRENT_SPEC_VERSION "1.2" @@ -39,3 +42,4 @@ gboolean desktop_file_validate (const char *filename, gboolean desktop_file_fixup (GKeyFile *keyfile, const char *filename); +#endif /* __DFU_VALIDATE_H__ */ -- cgit v1.2.1