From 1f8309e767163d11674c5406c0b0e1593415ac53 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 14 Oct 2024 13:34:26 -0400 Subject: [PATCH] Guard export includes in every public header (#1303) Signed-off-by: Juan Cruz Viotti --- src/evaluator/include/sourcemeta/jsontoolkit/evaluator.h | 2 ++ .../include/sourcemeta/jsontoolkit/evaluator_context.h | 2 ++ src/evaluator/include/sourcemeta/jsontoolkit/evaluator_error.h | 2 ++ src/json/include/sourcemeta/jsontoolkit/json.h | 2 ++ src/json/include/sourcemeta/jsontoolkit/json_error.h | 2 ++ src/json/include/sourcemeta/jsontoolkit/json_value.h | 2 ++ src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h | 2 ++ src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h | 2 ++ src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonpointer_error.h | 2 ++ src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_anchor.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_bundle.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_compile.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_error.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_reference.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_resolver.h | 2 ++ .../include/sourcemeta/jsontoolkit/jsonschema_walker.h | 2 ++ src/uri/include/sourcemeta/jsontoolkit/uri.h | 2 ++ src/uri/include/sourcemeta/jsontoolkit/uri_error.h | 2 ++ 20 files changed, 40 insertions(+) diff --git a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator.h b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator.h index ff241c586..6a682ff00 100644 --- a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator.h +++ b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_H_ #define SOURCEMETA_JSONTOOLKIT_EVALUATOR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_EXPORT #include "evaluator_export.h" +#endif #include #include diff --git a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_context.h b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_context.h index 3d94168e0..97680319f 100644 --- a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_context.h +++ b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_context.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_CONTEXT_H #define SOURCEMETA_JSONTOOLKIT_EVALUATOR_CONTEXT_H +#ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_EXPORT #include "evaluator_export.h" +#endif #include diff --git a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_error.h b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_error.h index 46df26444..7bbaa5228 100644 --- a/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_error.h +++ b/src/evaluator/include/sourcemeta/jsontoolkit/evaluator_error.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_ERROR_H #define SOURCEMETA_JSONTOOLKIT_EVALUATOR_ERROR_H +#ifndef SOURCEMETA_JSONTOOLKIT_EVALUATOR_EXPORT #include "evaluator_export.h" +#endif #include // std::exception #include // std::string diff --git a/src/json/include/sourcemeta/jsontoolkit/json.h b/src/json/include/sourcemeta/jsontoolkit/json.h index 19fd1b970..88224e69d 100644 --- a/src/json/include/sourcemeta/jsontoolkit/json.h +++ b/src/json/include/sourcemeta/jsontoolkit/json.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_H_ #define SOURCEMETA_JSONTOOLKIT_JSON_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT #include "json_export.h" +#endif #include #include diff --git a/src/json/include/sourcemeta/jsontoolkit/json_error.h b/src/json/include/sourcemeta/jsontoolkit/json_error.h index 08b90cab2..4e9b341a0 100644 --- a/src/json/include/sourcemeta/jsontoolkit/json_error.h +++ b/src/json/include/sourcemeta/jsontoolkit/json_error.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_ERROR_H_ #define SOURCEMETA_JSONTOOLKIT_JSON_ERROR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT #include "json_export.h" +#endif #include // std::uint64_t #include // std::exception diff --git a/src/json/include/sourcemeta/jsontoolkit/json_value.h b/src/json/include/sourcemeta/jsontoolkit/json_value.h index e2142b02d..005561f71 100644 --- a/src/json/include/sourcemeta/jsontoolkit/json_value.h +++ b/src/json/include/sourcemeta/jsontoolkit/json_value.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_VALUE_H_ #define SOURCEMETA_JSONTOOLKIT_JSON_VALUE_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT #include "json_export.h" +#endif #include #include diff --git a/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h b/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h index 0f76cad13..813210f83 100644 --- a/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h +++ b/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONL_H_ #define SOURCEMETA_JSONTOOLKIT_JSONL_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONL_EXPORT #include "jsonl_export.h" +#endif #include #include diff --git a/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h b/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h index 654098ad8..6e2d31b74 100644 --- a/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h +++ b/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONL_ITERATOR_H_ #define SOURCEMETA_JSONTOOLKIT_JSONL_ITERATOR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONL_EXPORT #include "jsonl_export.h" +#endif #include diff --git a/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h b/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h index cedda358a..2cd68d9a0 100644 --- a/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h +++ b/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_H_ #define SOURCEMETA_JSONTOOLKIT_JSONPOINTER_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_EXPORT #include "jsonpointer_export.h" +#endif #include #include diff --git a/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h b/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h index 6710219db..71b08a124 100644 --- a/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h +++ b/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_ERROR_H_ #define SOURCEMETA_JSONTOOLKIT_JSONPOINTER_ERROR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_EXPORT #include "jsonpointer_export.h" +#endif #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h index d7b777978..56220e89f 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h index 15d7eaf0d..a55d0c7c3 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ANCHOR_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ANCHOR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h index 53f3f608b..bacca9534 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_BUNDLE_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_BUNDLE_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h index a535a656c..25cfa5b57 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_COMPILE_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_COMPILE_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h index 0a368029b..1fc5c187b 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ERROR_H #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ERROR_H +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h index e60a7ee12..3f4ff6afb 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_REFERENCE_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_REFERENCE_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h index c2d536ff3..d1cb51d8f 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_RESOLVER_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_RESOLVER_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include diff --git a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h index 9148de550..625a7f82c 100644 --- a/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h +++ b/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_WALKER_H_ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_WALKER_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT #include "jsonschema_export.h" +#endif #include #include diff --git a/src/uri/include/sourcemeta/jsontoolkit/uri.h b/src/uri/include/sourcemeta/jsontoolkit/uri.h index 8c5ef1d48..b9ee2d4cf 100644 --- a/src/uri/include/sourcemeta/jsontoolkit/uri.h +++ b/src/uri/include/sourcemeta/jsontoolkit/uri.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_URI_H_ #define SOURCEMETA_JSONTOOLKIT_URI_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_URI_EXPORT #include "uri_export.h" +#endif #include diff --git a/src/uri/include/sourcemeta/jsontoolkit/uri_error.h b/src/uri/include/sourcemeta/jsontoolkit/uri_error.h index 110bf799f..8062f4503 100644 --- a/src/uri/include/sourcemeta/jsontoolkit/uri_error.h +++ b/src/uri/include/sourcemeta/jsontoolkit/uri_error.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_JSONTOOLKIT_URI_ERROR_H_ #define SOURCEMETA_JSONTOOLKIT_URI_ERROR_H_ +#ifndef SOURCEMETA_JSONTOOLKIT_URI_EXPORT #include "uri_export.h" +#endif #include // std::uint64_t #include // std::exception