13
0

Fix --no-nls, i18n include order in libs -- #8361

Ardour's "pbd/i18n.h" needs to be included last,
after any include that may indirectly pull in getext or libintl.

For that reason "pbd/i18n.h" must not be used in header files either.
This commit is contained in:
Robin Gareus 2020-08-19 17:39:32 +02:00
parent af254b8ff9
commit fcd347fe0c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
14 changed files with 31 additions and 21 deletions

View File

@ -22,8 +22,6 @@
#include <boost/optional.hpp>
#include "pbd/i18n.h"
#include "evoral/Curve.h"
#include "ardour/disk_io.h"
@ -46,10 +44,7 @@ public:
bool set_name (std::string const& str);
std::string display_name () const
{
return std::string (_("player"));
}
std::string display_name () const;
static samplecnt_t chunk_samples ()
{

View File

@ -23,8 +23,6 @@
#include <list>
#include <vector>
#include "pbd/i18n.h"
#include "ardour/disk_io.h"
#include "ardour/midi_buffer.h"
@ -42,7 +40,7 @@ public:
~DiskWriter ();
bool set_name (std::string const& str);
std::string display_name () const { return std::string (_ ("recorder")); }
std::string display_name () const;
bool recordable () const { return _flags & Recordable; }

View File

@ -29,7 +29,6 @@
#include <ltc.h>
#include "pbd/i18n.h"
#include "pbd/properties.h"
#include "pbd/signals.h"
#include "pbd/statefuldestructible.h"
@ -123,7 +122,7 @@ struct LIBARDOUR_API SafeTime {
do {
if (tries == 10) {
std::cerr << X_("SafeTime: atomic read of current time failed, sleeping!") << std::endl;
std::cerr << "SafeTime: atomic read of current time failed, sleeping!" << std::endl;
Glib::usleep (20);
tries = 0;
}

View File

@ -76,6 +76,12 @@ DiskReader::~DiskReader ()
DEBUG_TRACE (DEBUG::Destruction, string_compose ("DiskReader %1 @ %2 deleted\n", _name, this));
}
std::string
DiskReader::display_name () const
{
return std::string (_("player"));
}
void
DiskReader::ReaderChannelInfo::resize (samplecnt_t bufsize)
{

View File

@ -85,6 +85,12 @@ DiskWriter::default_chunk_samples ()
return 65536;
}
std::string
DiskWriter::display_name () const
{
return std::string (_ ("recorder"));
}
void
DiskWriter::WriterChannelInfo::resize (samplecnt_t bufsize)
{

View File

@ -26,7 +26,6 @@
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
#include "pbd/i18n.h"
#include "ardour/audioengine.h"
#include "ardour/debug.h"
@ -34,6 +33,8 @@
#include "ardour/port_engine.h"
#include "ardour/rc_configuration.h"
#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
using namespace PBD;

View File

@ -21,10 +21,11 @@
#include <regex.h>
#include "pbd/error.h"
#include "pbd/i18n.h"
#include "ardour/port_engine_shared.h"
#include "pbd/i18n.h"
using namespace ARDOUR;
BackendPort::BackendPort (PortEngineSharedImpl &b, const std::string& name, PortFlags flags)

View File

@ -30,7 +30,6 @@
#include <glibmm/threads.h>
#include "pbd/i18n.h"
#include "pbd/types_convert.h"
#include "pbd/xml++.h"
@ -47,6 +46,8 @@
#include "ardour/transient_detector.h"
#include "ardour/types_convert.h"
#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
using namespace PBD;

View File

@ -22,7 +22,6 @@
#include <boost/none.hpp>
#include "pbd/error.h"
#include "pbd/i18n.h"
#include "pbd/pthread_utils.h"
#include "pbd/stacktrace.h"
@ -31,6 +30,8 @@
#include "ardour/session.h"
#include "ardour/transport_fsm.h"
#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace PBD;

View File

@ -21,7 +21,6 @@
#include "pbd/boost_debug.h"
#include "pbd/debug.h"
#include "pbd/i18n.h"
#include "ardour/audioengine.h"
#include "ardour/debug.h"
@ -32,6 +31,7 @@
#include "ardour/types_convert.h"
#include "ardour/utils.h"
#include "pbd/i18n.h"
namespace ARDOUR {
namespace Properties {

View File

@ -24,12 +24,13 @@
#include "gtkmm2ext/actions.h"
#include "gtkmm2ext/action_model.h"
#include "pbd/i18n.h"
#include "pbd/strsplit.h"
#include "pbd/signals.h"
#include "button_config_widget.h"
#include "pbd/i18n.h"
using namespace std;
using namespace Gtk;
using namespace ArdourSurface;

View File

@ -37,12 +37,12 @@
#include "widgets/ardour_button.h"
#include "pbd/i18n.h"
#include "contourdesign.h"
#include "jump_distance_widget.h"
#include "button_config_widget.h"
#include "pbd/i18n.h"
using namespace ArdourSurface;
class ContourDesignGUI : public Gtk::VBox, public PBD::ScopedConnectionList

View File

@ -21,10 +21,10 @@
#include <gtkmm/spinbutton.h>
#include "gtkmm2ext/utils.h"
#include "pbd/i18n.h"
#include "jump_distance_widget.h"
#include "pbd/i18n.h"
using namespace std;
using namespace Gtk;

View File

@ -41,7 +41,6 @@
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
#include "pbd/file_utils.h"
#include "pbd/i18n.h"
#include "pbd/strsplit.h"
#include "pbd/types_convert.h"
#include "pbd/xml++.h"
@ -66,6 +65,8 @@
#include "pbd/abstract_ui.cc" // instantiate template
#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace PBD;
using namespace Glib;