diff --git a/bitmap2component/bitmap2component.cpp b/bitmap2component/bitmap2component.cpp index c553d0bb77..cd04248397 100644 --- a/bitmap2component/bitmap2component.cpp +++ b/bitmap2component/bitmap2component.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include "bitmap2component.h" diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 28a46bcf74..50837cb6f0 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -354,6 +354,7 @@ set( COMMON_SRCS lib_table_base.cpp lib_tree_model.cpp lib_tree_model_adapter.cpp + locale_io.cpp lockfile.cpp lset.cpp marker_base.cpp diff --git a/common/common.cpp b/common/common.cpp index c6cfab0cc9..44b9c06f79 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -238,87 +238,6 @@ bool IsMetricUnit( EDA_UNITS aUnit ) } -/** - * Global variables definitions. - * - * TODO: All of these variables should be moved into the class were they - * are defined and used. Most of them probably belong in the - * application class. - */ - -// When reading/writing files, we need to swtich to setlocale( LC_NUMERIC, "C" ). -// Works fine to read/write files with floating point numbers. -// We can call setlocale( LC_NUMERIC, "C" ) of wxLocale( "C", "C", "C", false ) -// wxWidgets discourage a direct call to setlocale -// However, for us, calling wxLocale( "C", "C", "C", false ) has a unwanted effect: -// The I18N translations are no longer active, because the English dixtionary is selected. -// To read files, this is not a major issues, but the resul can differ -// from using setlocale(xx, "C"). -// Previouly, we called setlocale( LC_NUMERIC, "C" ) -// The old code will be removed when calling wxLocale( "C", "C", "C", false ) -// is fully tested, and all issues fixed -#define USE_WXLOCALE 1 /* 0 to call setlocale, 1 to call wxLocale */ - -// On Windows, when using setlocale, a wx alert is generated -// in some cases (reading a bitmap for instance) -// So we disable alerts during the time a file is read or written -#if !USE_WXLOCALE -#if defined( _WIN32 ) && defined( DEBUG ) -// a wxAssertHandler_t function to filter wxWidgets alert messages when reading/writing a file -// when switching the locale to LC_NUMERIC, "C" -// It is used in class LOCALE_IO to hide a useless (in kicad) wxWidgets alert message -void KiAssertFilter( const wxString &file, int line, - const wxString &func, const wxString &cond, - const wxString &msg) -{ - if( !msg.Contains( "Decimal separator mismatch" ) ) - wxTheApp->OnAssertFailure( file.c_str(), line, func.c_str(), cond.c_str(), msg.c_str() ); -} -#endif -#endif - -std::atomic LOCALE_IO::m_c_count( 0 ); -LOCALE_IO::LOCALE_IO() : m_wxLocale( nullptr ) -{ - // use thread safe, atomic operation - if( m_c_count++ == 0 ) - { -#if USE_WXLOCALE - m_wxLocale = new wxLocale( "C", "C", "C", false ); -#else - // Store the user locale name, to restore this locale later, in dtor - m_user_locale = setlocale( LC_NUMERIC, nullptr ); -#if defined( _WIN32 ) && defined( DEBUG ) - // Disable wxWidgets alerts - wxSetAssertHandler( KiAssertFilter ); -#endif - // Switch the locale to C locale, to read/write files with fp numbers - setlocale( LC_NUMERIC, "C" ); -#endif - } -} - - -LOCALE_IO::~LOCALE_IO() -{ - // use thread safe, atomic operation - if( --m_c_count == 0 ) - { - // revert to the user locale -#if USE_WXLOCALE - delete m_wxLocale; // Deleting m_wxLocale restored previous locale - m_wxLocale = nullptr; -#else - setlocale( LC_NUMERIC, m_user_locale.c_str() ); -#if defined( _WIN32 ) && defined( DEBUG ) - // Enable wxWidgets alerts - wxSetDefaultAssertHandler(); -#endif -#endif - } -} - - wxSize GetTextSize( const wxString& aSingleLine, wxWindow* aWindow ) { wxCoord width; diff --git a/common/config_params.cpp b/common/config_params.cpp index a6d4f8769e..81650033d2 100644 --- a/common/config_params.cpp +++ b/common/config_params.cpp @@ -24,8 +24,8 @@ */ -#include // for LOCALE_IO #include // for PARAM_CFG_INT_WITH_SCALE, PARAM_CFG_... +#include #include // for COLOR4D #include // for KiROUND #include // for wxConfigBase diff --git a/common/locale_io.cpp b/common/locale_io.cpp new file mode 100644 index 0000000000..26a59f1978 --- /dev/null +++ b/common/locale_io.cpp @@ -0,0 +1,48 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +std::atomic LOCALE_IO::m_c_count( 0 ); + + +LOCALE_IO::LOCALE_IO() : m_wxLocale( nullptr ) +{ + // use thread safe, atomic operation + if( m_c_count++ == 0 ) + { + m_wxLocale = new wxLocale( "C", "C", "C", false ); + } +} + + +LOCALE_IO::~LOCALE_IO() +{ + // use thread safe, atomic operation + if( --m_c_count == 0 ) + { + delete m_wxLocale; // Deleting m_wxLocale restored previous locale + m_wxLocale = nullptr; + } +} \ No newline at end of file diff --git a/common/page_layout/page_layout_reader.cpp b/common/page_layout/page_layout_reader.cpp index c5aca1c911..e889d1e9f6 100644 --- a/common/page_layout/page_layout_reader.cpp +++ b/common/page_layout/page_layout_reader.cpp @@ -30,6 +30,7 @@ */ #include +#include #include #include #include diff --git a/common/page_layout/ws_data_model_io.cpp b/common/page_layout/ws_data_model_io.cpp index e74ca2bd95..4019e65ef1 100644 --- a/common/page_layout/ws_data_model_io.cpp +++ b/common/page_layout/ws_data_model_io.cpp @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/common/settings/json_settings.cpp b/common/settings/json_settings.cpp index 7368ad1b43..a3a6ba7a77 100644 --- a/common/settings/json_settings.cpp +++ b/common/settings/json_settings.cpp @@ -24,13 +24,14 @@ #include #include -#include +#include #include #include #include #include #include #include +#include #include const wxChar* const traceSettings = wxT( "KICAD_SETTINGS" ); diff --git a/eeschema/libedit/libedit_plot_component.cpp b/eeschema/libedit/libedit_plot_component.cpp index 42639a9932..c8db3cb61d 100644 --- a/eeschema/libedit/libedit_plot_component.cpp +++ b/eeschema/libedit/libedit_plot_component.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/eeschema/plotters/plot_schematic_DXF.cpp b/eeschema/plotters/plot_schematic_DXF.cpp index e9e95d4cea..e8c2d0b6b2 100644 --- a/eeschema/plotters/plot_schematic_DXF.cpp +++ b/eeschema/plotters/plot_schematic_DXF.cpp @@ -25,6 +25,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include diff --git a/eeschema/plotters/plot_schematic_HPGL.cpp b/eeschema/plotters/plot_schematic_HPGL.cpp index deba525b2d..e3e3fbfc75 100644 --- a/eeschema/plotters/plot_schematic_HPGL.cpp +++ b/eeschema/plotters/plot_schematic_HPGL.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/plotters/plot_schematic_PDF.cpp b/eeschema/plotters/plot_schematic_PDF.cpp index 1909c23595..3b932886e8 100644 --- a/eeschema/plotters/plot_schematic_PDF.cpp +++ b/eeschema/plotters/plot_schematic_PDF.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/plotters/plot_schematic_PS.cpp b/eeschema/plotters/plot_schematic_PS.cpp index 72d496eb56..f4c2add459 100644 --- a/eeschema/plotters/plot_schematic_PS.cpp +++ b/eeschema/plotters/plot_schematic_PS.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/plotters/plot_schematic_SVG.cpp b/eeschema/plotters/plot_schematic_SVG.cpp index 4b8d302e88..a4e48688a7 100644 --- a/eeschema/plotters/plot_schematic_SVG.cpp +++ b/eeschema/plotters/plot_schematic_SVG.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp index c2b527e700..541d7f8522 100644 --- a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp +++ b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp index 8e019cad6a..077b385d5b 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp index 596841e701..e654af96dc 100644 --- a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp +++ b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp index 269c8e4278..db0a3a4b11 100644 --- a/eeschema/sim/ngspice.cpp +++ b/eeschema/sim/ngspice.cpp @@ -32,6 +32,7 @@ #include "spice_reporter.h" #include +#include #include #include diff --git a/eeschema/sim/spice_value.cpp b/eeschema/sim/spice_value.cpp index 0355bea984..5cf604c0e6 100644 --- a/eeschema/sim/spice_value.cpp +++ b/eeschema/sim/spice_value.cpp @@ -32,6 +32,7 @@ #include #include #include +#include SPICE_VALUE::SPICE_VALUE( const wxString& aString ) { diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index a5765f3b47..98cfdea7b5 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index 25a047c4ba..969801302a 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/gerbview/job_file_reader.cpp b/gerbview/job_file_reader.cpp index 3c773d7d4b..f60093ab5d 100644 --- a/gerbview/job_file_reader.cpp +++ b/gerbview/job_file_reader.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index a4eaeacd01..b41907bd04 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f15c34066b..935efadced 100644 --- a/include/common.h +++ b/include/common.h @@ -212,31 +212,6 @@ enum class EDA_UNITS bool IsImperialUnit( EDA_UNITS aUnit ); bool IsMetricUnit( EDA_UNITS aUnit ); - -/** - * Instantiate the current locale within a scope in which you are expecting - * exceptions to be thrown. - * - * The constructor sets a "C" language locale option, to read/print files with floating - * point numbers. The destructor insures that the default locale is restored if an - * exception is thrown or not. - */ -class LOCALE_IO -{ -public: - LOCALE_IO(); - ~LOCALE_IO(); - -private: - // allow for nesting of LOCALE_IO instantiations - static std::atomic m_c_count; - - // The locale in use before switching to the "C" locale - // (the locale can be set by user, and is not always the system locale) - std::string m_user_locale; - wxLocale* m_wxLocale; -}; - /** * Return the size of @a aSingleLine of text when it is rendered in @a aWindow * using whatever font is currently set in that window. diff --git a/include/locale_io.h b/include/locale_io.h new file mode 100644 index 0000000000..12845e0da5 --- /dev/null +++ b/include/locale_io.h @@ -0,0 +1,56 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef LOCALE_IO_H +#define LOCALE_IO_H + +#include +#include + +class wxLocale; + +/** + * Instantiate the current locale within a scope in which you are expecting + * exceptions to be thrown. + * + * The constructor sets a "C" language locale option, to read/print files with floating + * point numbers. The destructor insures that the default locale is restored if an + * exception is thrown or not. + */ +class LOCALE_IO +{ +public: + LOCALE_IO(); + ~LOCALE_IO(); + +private: + // allow for nesting of LOCALE_IO instantiations + static std::atomic m_c_count; + + // The locale in use before switching to the "C" locale + // (the locale can be set by user, and is not always the system locale) + std::string m_user_locale; + wxLocale* m_wxLocale; +}; + +#endif \ No newline at end of file diff --git a/pcb_calculator/datafile_read_write.cpp b/pcb_calculator/datafile_read_write.cpp index 90228c338a..077c164085 100644 --- a/pcb_calculator/datafile_read_write.cpp +++ b/pcb_calculator/datafile_read_write.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/board_stackup_manager/board_stackup_reporter.cpp b/pcbnew/board_stackup_manager/board_stackup_reporter.cpp index 6f34fe0653..cba4351ed3 100644 --- a/pcbnew/board_stackup_manager/board_stackup_reporter.cpp +++ b/pcbnew/board_stackup_manager/board_stackup_reporter.cpp @@ -29,6 +29,7 @@ #include "wx/string.h" #include +#include #include "class_board_stackup.h" #include "stackup_predefined_prms.h" diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index d1ff58de3e..91ace21248 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -32,6 +32,7 @@ #include "reporter.h" #include "class_board.h" #include "dialog_export_step_base.h" +#include #include #include // LAST_PATH_TYPE #include diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp index 44e302893f..bd61782af1 100644 --- a/pcbnew/dialogs/dialog_export_svg.cpp +++ b/pcbnew/dialogs/dialog_export_svg.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index ed4d3dc1bd..66275a147a 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index 515ab8b8a8..04e590f4e3 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_footprints_placefile.cpp b/pcbnew/exporters/export_footprints_placefile.cpp index 2ab3b1fb0b..9f72a064c4 100644 --- a/pcbnew/exporters/export_footprints_placefile.cpp +++ b/pcbnew/exporters/export_footprints_placefile.cpp @@ -27,6 +27,7 @@ */ #include +#include #include #include diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 781b8431b2..b694f54aec 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp index b5b72c5081..853ea12ab6 100644 --- a/pcbnew/exporters/export_hyperlynx.cpp +++ b/pcbnew/exporters/export_hyperlynx.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 1b2a2fe132..39e769dd8b 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -27,6 +27,7 @@ #include +#include #include #include #include diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 8dac54aad2..6822c7a8b6 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include // for KiROUND #include diff --git a/pcbnew/exporters/gendrill_Excellon_writer.cpp b/pcbnew/exporters/gendrill_Excellon_writer.cpp index fb8b9973e5..e07e2ed9eb 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.cpp +++ b/pcbnew/exporters/gendrill_Excellon_writer.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/exporters/gendrill_gerber_writer.cpp b/pcbnew/exporters/gendrill_gerber_writer.cpp index 32c9040d21..bebb0ffc04 100644 --- a/pcbnew/exporters/gendrill_gerber_writer.cpp +++ b/pcbnew/exporters/gendrill_gerber_writer.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp index baa6ca76fe..8677eb9cbe 100644 --- a/pcbnew/exporters/gerber_jobfile_writer.cpp +++ b/pcbnew/exporters/gerber_jobfile_writer.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/pcbnew/exporters/gerber_placefile_writer.cpp b/pcbnew/exporters/gerber_placefile_writer.cpp index 18debdc84b..93b1831ffc 100644 --- a/pcbnew/exporters/gerber_placefile_writer.cpp +++ b/pcbnew/exporters/gerber_placefile_writer.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/pcbnew/footprint_info_impl.cpp b/pcbnew/footprint_info_impl.cpp index 2a090ec346..3864d9a3dd 100644 --- a/pcbnew/footprint_info_impl.cpp +++ b/pcbnew/footprint_info_impl.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index 79eeaf0ba8..68a77c8e92 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -26,6 +26,7 @@ #include "dialog_import_gfx.h" #include +#include #include #include #include diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index 73981c006a..d748f8f66a 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/pcbnew/microwave/microwave_polygon.cpp b/pcbnew/microwave/microwave_polygon.cpp index 9599abc1e6..987222f2d5 100644 --- a/pcbnew/microwave/microwave_polygon.cpp +++ b/pcbnew/microwave/microwave_polygon.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 07405f5936..95bb55e54c 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/eagle/eagle_plugin.cpp b/pcbnew/plugins/eagle/eagle_plugin.cpp index 844945891a..9a6aab5ad8 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.cpp +++ b/pcbnew/plugins/eagle/eagle_plugin.cpp @@ -59,6 +59,7 @@ Load() TODO's #include #include #include +#include #include #include #include // for KiROUND diff --git a/pcbnew/plugins/geda/gpcb_plugin.cpp b/pcbnew/plugins/geda/gpcb_plugin.cpp index 2e5d34ba11..efde4b6c78 100644 --- a/pcbnew/plugins/geda/gpcb_plugin.cpp +++ b/pcbnew/plugins/geda/gpcb_plugin.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp index 5685351c15..b017b16318 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.cpp +++ b/pcbnew/plugins/kicad/kicad_plugin.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp index 65e6300a0d..50a6f5a123 100644 --- a/pcbnew/plugins/kicad/pcb_parser.cpp +++ b/pcbnew/plugins/kicad/pcb_parser.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include // for RECT_CHAMFER_POSITIONS definition diff --git a/pcbnew/plugins/legacy/legacy_plugin.cpp b/pcbnew/plugins/legacy/legacy_plugin.cpp index 65087369f4..24c82405b4 100644 --- a/pcbnew/plugins/legacy/legacy_plugin.cpp +++ b/pcbnew/plugins/legacy/legacy_plugin.cpp @@ -67,6 +67,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/plugins/pcad/pcad_plugin.cpp b/pcbnew/plugins/pcad/pcad_plugin.cpp index 3d8a6fb886..92231d3040 100644 --- a/pcbnew/plugins/pcad/pcad_plugin.cpp +++ b/pcbnew/plugins/pcad/pcad_plugin.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index 66745ceda9..d4839bb811 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -35,6 +35,7 @@ #include // DisplayError() #include // EDA_FileSelector() #include // RotatePoint() +#include #include #include // for KiROUND diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 17bdc376d4..74f9dfa3ea 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -35,6 +35,7 @@ #include // DisplayError() #include // EDA_FileSelector() #include +#include #include #include #include