#include <config.h>
-// Needed to prevent the definition of the unnamed_PathChanger macro
-// in the header file.
-
-#define PATHCHANGER_C
-
#include "support/Path.h"
#include "support/lyxlib.h"
+// undef PathChanger macro when building PathChanger
+#undef PathChanger
+
namespace lyx {
namespace support {
} // namespace support
} // namespace lyx
+
+
+#define PathChanger(x) unnamed_PathChanger;
+// in merged builds this is not the last line.
// PathChanger("/tmp"); // wrong
// PathChanger p("/tmp"); // right
// we add this macro:
-#ifndef PATHCHANGER_C
#define PathChanger(x) unnamed_PathChanger;
-#endif
// Tip gotten from Bobby Schmidt's column in C/C++ Users Journal
} // namespace support