From f34d60ca65e52501b397e6619bef1a9392fd656b Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Wed, 2 Mar 2011 06:11:41 +0000 Subject: [PATCH] Flipped the include guard and the pragma, and don't use the pragma for early versions of gcc (< 3.4) --- include/yaml-cpp/aliasmanager.h | 6 ++++-- include/yaml-cpp/anchor.h | 6 ++++-- include/yaml-cpp/contrib/anchordict.h | 6 ++++-- include/yaml-cpp/contrib/graphbuilder.h | 4 ++++ include/yaml-cpp/conversion.h | 6 ++++-- include/yaml-cpp/emitfromevents.h | 6 ++++-- include/yaml-cpp/emitter.h | 6 ++++-- include/yaml-cpp/emittermanip.h | 6 ++++-- include/yaml-cpp/eventhandler.h | 6 ++++-- include/yaml-cpp/exceptions.h | 6 ++++-- include/yaml-cpp/iterator.h | 6 ++++-- include/yaml-cpp/mark.h | 6 ++++-- include/yaml-cpp/node.h | 6 ++++-- include/yaml-cpp/nodeimpl.h | 6 ++++-- include/yaml-cpp/nodeproperties.h | 6 ++++-- include/yaml-cpp/nodereadimpl.h | 8 ++++++++ include/yaml-cpp/nodeutil.h | 6 ++++-- include/yaml-cpp/noncopyable.h | 6 ++++-- include/yaml-cpp/null.h | 6 ++++-- include/yaml-cpp/ostream.h | 6 ++++-- include/yaml-cpp/parser.h | 6 ++++-- include/yaml-cpp/stlemitter.h | 6 ++++-- include/yaml-cpp/stlnode.h | 6 ++++-- include/yaml-cpp/traits.h | 6 ++++-- include/yaml-cpp/yaml.h | 6 ++++-- src/aliascontent.h | 6 ++++-- src/collectionstack.h | 6 ++++-- src/content.h | 6 ++++-- src/contrib/graphbuilderadapter.h | 4 ++++ src/directives.h | 6 ++++-- src/emitterstate.h | 6 ++++-- src/emitterutils.h | 6 ++++-- src/exp.h | 6 ++++-- src/indentation.h | 6 ++++-- src/iterpriv.h | 6 ++++-- src/ltnode.h | 6 ++++-- src/map.h | 6 ++++-- src/nodebuilder.h | 6 ++++-- src/ptr_stack.h | 6 ++++-- src/regex.h | 6 ++++-- src/regeximpl.h | 6 ++++-- src/scalar.h | 6 ++++-- src/scanner.h | 6 ++++-- src/scanscalar.h | 6 ++++-- src/scantag.h | 6 ++++-- src/sequence.h | 6 ++++-- src/setting.h | 6 ++++-- src/singledocparser.h | 6 ++++-- src/stream.h | 6 ++++-- src/streamcharsource.h | 6 ++++-- src/stringsource.h | 6 ++++-- src/tag.h | 6 ++++-- src/token.h | 6 ++++-- test/emittertests.h | 6 ++++-- test/parsertests.h | 6 ++++-- test/spectests.h | 6 ++++-- test/tests.h | 6 ++++-- 57 files changed, 232 insertions(+), 108 deletions(-) diff --git a/include/yaml-cpp/aliasmanager.h b/include/yaml-cpp/aliasmanager.h index 4db9c89..8b01a69 100644 --- a/include/yaml-cpp/aliasmanager.h +++ b/include/yaml-cpp/aliasmanager.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ALIASMANAGER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ALIASMANAGER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/anchor.h" #include diff --git a/include/yaml-cpp/anchor.h b/include/yaml-cpp/anchor.h index c7b283a..175d4d7 100644 --- a/include/yaml-cpp/anchor.h +++ b/include/yaml-cpp/anchor.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include namespace YAML diff --git a/include/yaml-cpp/contrib/anchordict.h b/include/yaml-cpp/contrib/anchordict.h index fef8e9a..8638aab 100644 --- a/include/yaml-cpp/contrib/anchordict.h +++ b/include/yaml-cpp/contrib/anchordict.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include "../anchor.h" diff --git a/include/yaml-cpp/contrib/graphbuilder.h b/include/yaml-cpp/contrib/graphbuilder.h index 6b26b40..2ea139b 100644 --- a/include/yaml-cpp/contrib/graphbuilder.h +++ b/include/yaml-cpp/contrib/graphbuilder.h @@ -1,6 +1,10 @@ #ifndef GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include namespace YAML diff --git a/include/yaml-cpp/conversion.h b/include/yaml-cpp/conversion.h index fb2df7f..1036182 100644 --- a/include/yaml-cpp/conversion.h +++ b/include/yaml-cpp/conversion.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define CONVERSION_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/null.h" #include "yaml-cpp/traits.h" diff --git a/include/yaml-cpp/emitfromevents.h b/include/yaml-cpp/emitfromevents.h index a50e590..6b4f8ff 100644 --- a/include/yaml-cpp/emitfromevents.h +++ b/include/yaml-cpp/emitfromevents.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/eventhandler.h" #include diff --git a/include/yaml-cpp/emitter.h b/include/yaml-cpp/emitter.h index c115dc2..ef362bb 100644 --- a/include/yaml-cpp/emitter.h +++ b/include/yaml-cpp/emitter.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/emittermanip.h" #include "yaml-cpp/ostream.h" diff --git a/include/yaml-cpp/emittermanip.h b/include/yaml-cpp/emittermanip.h index fc29655..28e88be 100644 --- a/include/yaml-cpp/emittermanip.h +++ b/include/yaml-cpp/emittermanip.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include diff --git a/include/yaml-cpp/eventhandler.h b/include/yaml-cpp/eventhandler.h index f1f17db..bba874f 100644 --- a/include/yaml-cpp/eventhandler.h +++ b/include/yaml-cpp/eventhandler.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/anchor.h" #include diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h index 402e284..e940499 100644 --- a/include/yaml-cpp/exceptions.h +++ b/include/yaml-cpp/exceptions.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/mark.h" #include "yaml-cpp/traits.h" diff --git a/include/yaml-cpp/iterator.h b/include/yaml-cpp/iterator.h index bb9141f..069e91d 100644 --- a/include/yaml-cpp/iterator.h +++ b/include/yaml-cpp/iterator.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/mark.h b/include/yaml-cpp/mark.h index 7c3dfb3..358f251 100644 --- a/include/yaml-cpp/mark.h +++ b/include/yaml-cpp/mark.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/node.h b/include/yaml-cpp/node.h index 6938504..993434f 100644 --- a/include/yaml-cpp/node.h +++ b/include/yaml-cpp/node.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/conversion.h" #include "yaml-cpp/exceptions.h" diff --git a/include/yaml-cpp/nodeimpl.h b/include/yaml-cpp/nodeimpl.h index e9755de..12b25b9 100644 --- a/include/yaml-cpp/nodeimpl.h +++ b/include/yaml-cpp/nodeimpl.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NODEIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NODEIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/nodeutil.h" diff --git a/include/yaml-cpp/nodeproperties.h b/include/yaml-cpp/nodeproperties.h index ae435d5..63be8b0 100644 --- a/include/yaml-cpp/nodeproperties.h +++ b/include/yaml-cpp/nodeproperties.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NODEPROPERTIES_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NODEPROPERTIES_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { struct NodeProperties { diff --git a/include/yaml-cpp/nodereadimpl.h b/include/yaml-cpp/nodereadimpl.h index d315660..9ad5b83 100644 --- a/include/yaml-cpp/nodereadimpl.h +++ b/include/yaml-cpp/nodereadimpl.h @@ -1,4 +1,10 @@ +#ifndef NODEREADIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#define NODEREADIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 + +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 #pragma once +#endif + namespace YAML { @@ -76,3 +82,5 @@ namespace YAML return Convert(scalar, value); } } + +#endif // NODEREADIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 diff --git a/include/yaml-cpp/nodeutil.h b/include/yaml-cpp/nodeutil.h index 1be6b69..98ea4fa 100644 --- a/include/yaml-cpp/nodeutil.h +++ b/include/yaml-cpp/nodeutil.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NODEUTIL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NODEUTIL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/noncopyable.h b/include/yaml-cpp/noncopyable.h index 577b547..0b056e8 100644 --- a/include/yaml-cpp/noncopyable.h +++ b/include/yaml-cpp/noncopyable.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NONCOPYABLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NONCOPYABLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/null.h b/include/yaml-cpp/null.h index 3857683..b430344 100644 --- a/include/yaml-cpp/null.h +++ b/include/yaml-cpp/null.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/ostream.h b/include/yaml-cpp/ostream.h index a5912bb..90258ba 100644 --- a/include/yaml-cpp/ostream.h +++ b/include/yaml-cpp/ostream.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef OSTREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define OSTREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include diff --git a/include/yaml-cpp/parser.h b/include/yaml-cpp/parser.h index eec0e99..dc2ce5a 100644 --- a/include/yaml-cpp/parser.h +++ b/include/yaml-cpp/parser.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/noncopyable.h" #include diff --git a/include/yaml-cpp/stlemitter.h b/include/yaml-cpp/stlemitter.h index c2f86ff..1b5d864 100644 --- a/include/yaml-cpp/stlemitter.h +++ b/include/yaml-cpp/stlemitter.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/include/yaml-cpp/stlnode.h b/include/yaml-cpp/stlnode.h index cfe2f03..8d50f7f 100644 --- a/include/yaml-cpp/stlnode.h +++ b/include/yaml-cpp/stlnode.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef STLNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STLNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/include/yaml-cpp/traits.h b/include/yaml-cpp/traits.h index e9c42ad..32a3155 100644 --- a/include/yaml-cpp/traits.h +++ b/include/yaml-cpp/traits.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/include/yaml-cpp/yaml.h b/include/yaml-cpp/yaml.h index 052d306..674430e 100644 --- a/include/yaml-cpp/yaml.h +++ b/include/yaml-cpp/yaml.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/parser.h" #include "yaml-cpp/node.h" diff --git a/src/aliascontent.h b/src/aliascontent.h index d5893b4..235e88c 100644 --- a/src/aliascontent.h +++ b/src/aliascontent.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ALIASCONTENT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ALIASCONTENT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "content.h" diff --git a/src/collectionstack.h b/src/collectionstack.h index fd3b885..5274546 100644 --- a/src/collectionstack.h +++ b/src/collectionstack.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/src/content.h b/src/content.h index 598b290..f850247 100644 --- a/src/content.h +++ b/src/content.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef CONTENT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define CONTENT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/anchor.h" #include "yaml-cpp/exceptions.h" diff --git a/src/contrib/graphbuilderadapter.h b/src/contrib/graphbuilderadapter.h index 05a0b3a..b8c1f6a 100644 --- a/src/contrib/graphbuilderadapter.h +++ b/src/contrib/graphbuilderadapter.h @@ -1,6 +1,10 @@ #ifndef GRAPHBUILDERADAPTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define GRAPHBUILDERADAPTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include #include "yaml-cpp/eventhandler.h" diff --git a/src/directives.h b/src/directives.h index e063faa..2fa6f62 100644 --- a/src/directives.h +++ b/src/directives.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef DIRECTIVES_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define DIRECTIVES_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/src/emitterstate.h b/src/emitterstate.h index 87621b4..5df5008 100644 --- a/src/emitterstate.h +++ b/src/emitterstate.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITTERSTATE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITTERSTATE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "setting.h" #include "yaml-cpp/emittermanip.h" diff --git a/src/emitterutils.h b/src/emitterutils.h index a44ae2c..5b3de82 100644 --- a/src/emitterutils.h +++ b/src/emitterutils.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITTERUTILS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITTERUTILS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/ostream.h" #include diff --git a/src/exp.h b/src/exp.h index c42daec..0200d25 100644 --- a/src/exp.h +++ b/src/exp.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EXP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EXP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "regex.h" #include diff --git a/src/indentation.h b/src/indentation.h index db382ef..89d68df 100644 --- a/src/indentation.h +++ b/src/indentation.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef INDENTATION_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define INDENTATION_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/ostream.h" #include diff --git a/src/iterpriv.h b/src/iterpriv.h index d091fbc..cade13f 100644 --- a/src/iterpriv.h +++ b/src/iterpriv.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef ITERPRIV_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define ITERPRIV_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "ltnode.h" #include diff --git a/src/ltnode.h b/src/ltnode.h index c1672de..cf85435 100644 --- a/src/ltnode.h +++ b/src/ltnode.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef LTNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define LTNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace YAML { diff --git a/src/map.h b/src/map.h index 8eb44ee..ac2531b 100644 --- a/src/map.h +++ b/src/map.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef MAP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define MAP_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "content.h" #include diff --git a/src/nodebuilder.h b/src/nodebuilder.h index 9ef6815..1ecf2e3 100644 --- a/src/nodebuilder.h +++ b/src/nodebuilder.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef NODEBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define NODEBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/eventhandler.h" #include "ptr_stack.h" #include diff --git a/src/ptr_stack.h b/src/ptr_stack.h index cac785b..7a3a51c 100644 --- a/src/ptr_stack.h +++ b/src/ptr_stack.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef PTR_STACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define PTR_STACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/noncopyable.h" #include #include diff --git a/src/regex.h b/src/regex.h index 12d9be7..d797e9a 100644 --- a/src/regex.h +++ b/src/regex.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef REGEX_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define REGEX_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/src/regeximpl.h b/src/regeximpl.h index c13f236..aad9708 100644 --- a/src/regeximpl.h +++ b/src/regeximpl.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef REGEXIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define REGEXIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "stream.h" #include "stringsource.h" diff --git a/src/scalar.h b/src/scalar.h index 5843470..0cca420 100644 --- a/src/scalar.h +++ b/src/scalar.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "content.h" #include diff --git a/src/scanner.h b/src/scanner.h index 17908cc..f76c172 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SCANNER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SCANNER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/src/scanscalar.h b/src/scanscalar.h index 1f92b9e..52123e7 100644 --- a/src/scanscalar.h +++ b/src/scanscalar.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SCANSCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SCANSCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include "regex.h" diff --git a/src/scantag.h b/src/scantag.h index 77b315d..869d9e8 100644 --- a/src/scantag.h +++ b/src/scantag.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SCANTAG_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SCANTAG_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include "stream.h" diff --git a/src/sequence.h b/src/sequence.h index 342c5cb..2078d19 100644 --- a/src/sequence.h +++ b/src/sequence.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SEQUENCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SEQUENCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "content.h" #include diff --git a/src/setting.h b/src/setting.h index f11142b..f503ad2 100644 --- a/src/setting.h +++ b/src/setting.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SETTING_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SETTING_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include #include diff --git a/src/singledocparser.h b/src/singledocparser.h index 28355b8..86688a6 100644 --- a/src/singledocparser.h +++ b/src/singledocparser.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SINGLEDOCPARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/anchor.h" #include "yaml-cpp/noncopyable.h" diff --git a/src/stream.h b/src/stream.h index 7243fb6..e2fd4b5 100644 --- a/src/stream.h +++ b/src/stream.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef STREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/noncopyable.h" #include "yaml-cpp/mark.h" diff --git a/src/streamcharsource.h b/src/streamcharsource.h index 12548a4..55e9294 100644 --- a/src/streamcharsource.h +++ b/src/streamcharsource.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef STREAMCHARSOURCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STREAMCHARSOURCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/noncopyable.h" #include diff --git a/src/stringsource.h b/src/stringsource.h index 20d56ae..8a45755 100644 --- a/src/stringsource.h +++ b/src/stringsource.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef STRINGSOURCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define STRINGSOURCE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include diff --git a/src/tag.h b/src/tag.h index 68aa296..675b15e 100644 --- a/src/tag.h +++ b/src/tag.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef TAG_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define TAG_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include namespace YAML diff --git a/src/token.h b/src/token.h index 63093fc..11e97a3 100644 --- a/src/token.h +++ b/src/token.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef TOKEN_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define TOKEN_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include "yaml-cpp/mark.h" #include diff --git a/test/emittertests.h b/test/emittertests.h index e746e5a..4ba5f72 100644 --- a/test/emittertests.h +++ b/test/emittertests.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef EMITTERTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define EMITTERTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace Test { bool RunEmitterTests(); } diff --git a/test/parsertests.h b/test/parsertests.h index e63a2eb..a67fff8 100644 --- a/test/parsertests.h +++ b/test/parsertests.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef PARSERTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define PARSERTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace Test { bool RunParserTests(); } diff --git a/test/spectests.h b/test/spectests.h index fcb1fb4..e8acfb7 100644 --- a/test/spectests.h +++ b/test/spectests.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef SPECTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define SPECTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + namespace Test { bool RunSpecTests(); } diff --git a/test/tests.h b/test/tests.h index 0d39007..ec466a4 100644 --- a/test/tests.h +++ b/test/tests.h @@ -1,8 +1,10 @@ -#pragma once - #ifndef TESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define TESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + #include namespace Test {