From f941ba88a7edf03a516d3f418feb8c61bf267cae Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 21 Oct 2023 18:41:37 +0300 Subject: [PATCH] Avoid macro redefinition warnings --- src/cmdline.cpp | 4 +++- src/config_file.cpp | 5 +++-- src/convert.cpp | 4 +++- src/options_description.cpp | 5 +++-- src/parsers.cpp | 4 +++- src/positional_options.cpp | 4 +++- src/split.cpp | 4 +++- src/utf8_codecvt_facet.cpp | 4 +++- src/value_semantic.cpp | 4 +++- src/variables_map.cpp | 5 +++-- src/winmain.cpp | 4 +++- 11 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/cmdline.cpp b/src/cmdline.cpp index a768fa2..8f4ae64 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include diff --git a/src/config_file.cpp b/src/config_file.cpp index f2a57b4..d586523 100644 --- a/src/config_file.cpp +++ b/src/config_file.cpp @@ -3,8 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include diff --git a/src/convert.cpp b/src/convert.cpp index 692fcde..fbe2758 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -13,7 +13,9 @@ #include -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include #include diff --git a/src/options_description.cpp b/src/options_description.cpp index dc0eae8..0efdc33 100644 --- a/src/options_description.cpp +++ b/src/options_description.cpp @@ -4,8 +4,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include // FIXME: this is only to get multiple_occurrences class diff --git a/src/parsers.cpp b/src/parsers.cpp index f37953e..4dac608 100644 --- a/src/parsers.cpp +++ b/src/parsers.cpp @@ -6,7 +6,9 @@ #include -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include #include diff --git a/src/positional_options.cpp b/src/positional_options.cpp index 72dc0d6..cb6a145 100644 --- a/src/positional_options.cpp +++ b/src/positional_options.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include diff --git a/src/split.cpp b/src/split.cpp index 96da068..c674403 100644 --- a/src/split.cpp +++ b/src/split.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include diff --git a/src/utf8_codecvt_facet.cpp b/src/utf8_codecvt_facet.cpp index 2e4c532..075e4ae 100644 --- a/src/utf8_codecvt_facet.cpp +++ b/src/utf8_codecvt_facet.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #define BOOST_UTF8_BEGIN_NAMESPACE \ diff --git a/src/value_semantic.cpp b/src/value_semantic.cpp index a7366d4..9cd7cd1 100644 --- a/src/value_semantic.cpp +++ b/src/value_semantic.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include #include diff --git a/src/variables_map.cpp b/src/variables_map.cpp index bc85f7e..94ac614 100644 --- a/src/variables_map.cpp +++ b/src/variables_map.cpp @@ -3,8 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include #include diff --git a/src/winmain.cpp b/src/winmain.cpp index 6220043..31c8adc 100644 --- a/src/winmain.cpp +++ b/src/winmain.cpp @@ -3,7 +3,9 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PROGRAM_OPTIONS_SOURCE +#ifndef BOOST_PROGRAM_OPTIONS_SOURCE +# define BOOST_PROGRAM_OPTIONS_SOURCE +#endif #include #include