aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-14 00:25:01 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-14 00:25:01 +0000
commitce053167d479d063581cf91525580de348ebd94f (patch)
tree6d9be65fe566f75b2adf92ae33aba23cf8cc92e1
parente495833fa8e452c610dc6b757ddaf2277f98df28 (diff)
downloadpaludis-ce053167d479d063581cf91525580de348ebd94f.tar.gz
paludis-ce053167d479d063581cf91525580de348ebd94f.tar.xz
Make KeyValueConfigFile's behaviour configurable
-rw-r--r--paludis/config_file.cc77
-rw-r--r--paludis/config_file.hh35
-rw-r--r--paludis/config_file.se27
-rw-r--r--paludis/config_file_TEST.cc32
-rw-r--r--paludis/environments/paludis/paludis_config.cc8
-rw-r--r--paludis/environments/portage/portage_environment.cc8
-rw-r--r--paludis/repositories/gentoo/ebin_entries.cc4
-rw-r--r--paludis/repositories/gentoo/ebuild.cc3
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile.cc3
9 files changed, 147 insertions, 50 deletions
diff --git a/paludis/config_file.cc b/paludis/config_file.cc
index b1f6520..aa2723e 100644
--- a/paludis/config_file.cc
+++ b/paludis/config_file.cc
@@ -393,7 +393,7 @@ namespace
while (c != c_end)
{
if (*c == '\n' || *c == '\r' || *c == ' ' || *c == '\t' || *c == '=' || *c == '$' || *c == '\\'
- || *c == '"' || *c == '\'')
+ || *c == '"' || *c == '\'' || *c == '#')
break;
else
result.append(stringify(*c++));
@@ -483,7 +483,8 @@ namespace
throw ConfigFileError(f, "Unterminated 'quoted string");
}
- std::string grab_dquoted(std::istreambuf_iterator<char> & c, const std::istreambuf_iterator<char> & c_end,
+ std::string grab_dquoted(const KeyValueConfigFileOptions & opts,
+ std::istreambuf_iterator<char> & c, const std::istreambuf_iterator<char> & c_end,
const KeyValueConfigFile & d, const std::string & f)
{
std::string result;
@@ -496,7 +497,12 @@ namespace
throw ConfigFileError(f, "Unterminated \"quoted string ending in a backslash");
if (*c == '\n')
- ++c;
+ {
+ if (opts[kvcfo_disallow_continuations])
+ throw ConfigFileError(f, "\"quoted string ends in a backslash and continuations are not allowed");
+ else
+ ++c;
+ }
else if (*c == 't')
{
result.append("\t");
@@ -510,7 +516,7 @@ namespace
else
result.append(stringify(*c++));
}
- else if (*c == '$')
+ else if (*c == '$' && ! opts[kvcfo_disallow_variables])
result.append(grab_dollar(++c, c_end, d, f));
else if (*c == '"')
{
@@ -524,18 +530,19 @@ namespace
throw ConfigFileError(f, "Unterminated \"quoted string");
}
- std::string grab_value(std::istreambuf_iterator<char> & c, const std::istreambuf_iterator<char> & c_end,
+ std::string grab_value(const KeyValueConfigFileOptions & opts,
+ std::istreambuf_iterator<char> & c, const std::istreambuf_iterator<char> & c_end,
const KeyValueConfigFile & d, const std::string & f)
{
std::string result;
while (c != c_end)
{
- if (*c == '"')
- result.append(grab_dquoted(++c, c_end, d, f));
- else if (*c == '\'')
+ if (*c == '"' && ! opts[kvcfo_disallow_double_quoted_strings])
+ result.append(grab_dquoted(opts, ++c, c_end, d, f));
+ else if (*c == '\'' && ! opts[kvcfo_disallow_single_quoted_strings])
result.append(grab_squoted(++c, c_end, d, f));
- else if (*c == '\\')
+ else if (*c == '\\' && ! opts[kvcfo_disallow_continuations])
{
if (++c == c_end)
throw ConfigFileError(f, "Backslash at end of input");
@@ -550,7 +557,7 @@ namespace
else
result.append(stringify(*c++));
}
- else if (*c == '$')
+ else if (*c == '$' && ! opts[kvcfo_disallow_variables])
result.append(grab_dollar(++c, c_end, d, f));
else if (*c == '\n')
{
@@ -562,8 +569,20 @@ namespace
++c;
break;
}
+ else if (*c == ' ' || *c == '\t')
+ {
+ if (opts[kvcfo_disallow_space_inside_unquoted_values])
+ throw ConfigFileError(f, "Extra or trailing whitespace in value");
+
+ result.append(stringify(*c++));
+ }
else
+ {
+ if (opts[kvcfo_disallow_unquoted_values])
+ throw ConfigFileError(f, "Unquoted values not allowed");
+
result.append(stringify(*c++));
+ }
}
return result;
@@ -575,6 +594,20 @@ KeyValueConfigFile::KeyValueConfigFile(const Source & ss, const Defaults & d,
ConfigFile(ss),
PrivateImplementationPattern<KeyValueConfigFile>(new Implementation<KeyValueConfigFile>(d, i))
{
+ _parse(ss, KeyValueConfigFileOptions(), d);
+}
+
+KeyValueConfigFile::KeyValueConfigFile(const Source & ss, const KeyValueConfigFileOptions & o, const Defaults & d,
+ bool (* i) (const std::string &, const KeyValueConfigFile &)) :
+ ConfigFile(ss),
+ PrivateImplementationPattern<KeyValueConfigFile>(new Implementation<KeyValueConfigFile>(d, i))
+{
+ _parse(ss, o, d);
+}
+
+void
+KeyValueConfigFile::_parse(const Source & ss, const KeyValueConfigFileOptions & opts, const Defaults & d)
+{
Context context("When parsing key/value configuration file" + (ss.filename().empty() ? ":" :
"'" + ss.filename() + "':"));
@@ -602,7 +635,7 @@ KeyValueConfigFile::KeyValueConfigFile(const Source & ss, const Defaults & d,
Source & s(sources.back().first);
std::istreambuf_iterator<char> & c(sources.back().second);
- if (*c == '#')
+ if (*c == '#' && ! opts[kvcfo_disallow_comments])
next_line(c, c_end);
else if (*c == '\t' || *c == '\n' || *c == '\r' || *c == ' ')
++c;
@@ -617,17 +650,18 @@ KeyValueConfigFile::KeyValueConfigFile(const Source & ss, const Defaults & d,
if (*c != '=')
{
- while (*c == '\t' || *c == ' ')
- if (++c == c_end)
- throw ConfigFileError(s.filename(), "Unknown command or broken variable '" +
- key + "' at end of input");
+ if (! opts[kvcfo_disallow_space_around_equals])
+ while (*c == '\t' || *c == ' ')
+ if (++c == c_end)
+ throw ConfigFileError(s.filename(), "Unknown command or broken variable '" +
+ key + "' at end of input");
if (*c != '=')
{
- if (key == "source")
+ if (key == "source" && ! opts[kvcfo_disallow_source])
{
std::string value(strip_leading(strip_trailing(
- grab_value(c, c_end, *this, s.filename()), " \t"), "\t"));
+ grab_value(opts, c, c_end, *this, s.filename()), " \t"), "\t"));
if (value.empty())
throw ConfigFileError(s.filename(), "source expects a filename");
FSEntry target(value);
@@ -647,11 +681,12 @@ KeyValueConfigFile::KeyValueConfigFile(const Source & ss, const Defaults & d,
if (++c == c_end)
throw ConfigFileError(s.filename(), "= at end of input");
- while (*c == '\t' || *c == ' ')
- if (++c == c_end)
- throw ConfigFileError(s.filename(), "= at end of input");
+ if (! opts[kvcfo_disallow_space_around_equals])
+ while (*c == '\t' || *c == ' ')
+ if (++c == c_end)
+ throw ConfigFileError(s.filename(), "= at end of input");
- std::string value(grab_value(c, c_end, *this, s.filename()));
+ std::string value(grab_value(opts, c, c_end, *this, s.filename()));
if (_imp->is_incremental && (*_imp->is_incremental)(key, *this))
{
diff --git a/paludis/config_file.hh b/paludis/config_file.hh
index ad1fe39..d06f26b 100644
--- a/paludis/config_file.hh
+++ b/paludis/config_file.hh
@@ -204,8 +204,28 @@ namespace paludis
};
/**
+ * Options for a KeyValueConfigFileOptions.
+ *
+ * \see KeyValueConfigFileOption
+ * \see KeyValueConfigFile
+ */
+ typedef Options<KeyValueConfigFileOption> KeyValueConfigFileOptions;
+
+ /**
* A key=value configuration file.
*
+ * Various syntax options are available, and are controlled by KeyValueConfigFileOptions:
+ *
+ * - Unless kvcfo_disallow_continuations, line continuations via backslashes are allowed.
+ * - Unless kvcfo_disallow_comments, comments start with a \#.
+ * - Unless kvcfo_disallow_space_around_equals, the equals sign can have surrounding whitespace.
+ * - Unless kvcfo_disallow_space_inside_unquoted_values, foo = bar baz is legal.
+ * - Unless kvcfo_disallow_single_quoted_strings, single quoted strings are legal.
+ * - Unless kvcfo_disallow_double_quoted_strings, double quoted strings are legal.
+ * - Unless kvcfo_disallow_unquoted_values, unquoted values are legal.
+ * - Unless kvcfo_disallow_variables, variables using $foo and ${foo} are expanded.
+ * - Unless kvcfo_disallow_source, source path is legal.
+ *
* \ingroup grpkvconfigfile
* \nosubgrouping
*/
@@ -260,7 +280,7 @@ namespace paludis
/**
* Get the default value for a particular key.
*/
- std::string get(const std::string &) const;
+ std::string get(const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result));
///\name Iterate over our default keys
///\{
@@ -272,11 +292,24 @@ namespace paludis
///\}
};
+ private:
+ void _parse(const Source &, const KeyValueConfigFileOptions &, const Defaults &);
+
+ public:
///\name Basic operations
///\{
+ /**
+ * Constructor.
+ *
+ * \deprecated Use the form taking KeyValueConfigFileOptions.
+ */
KeyValueConfigFile(const Source &, const Defaults & = Defaults(),
+ bool (* is_incremental) (const std::string &, const KeyValueConfigFile &) = 0) PALUDIS_ATTRIBUTE((deprecated));
+
+ KeyValueConfigFile(const Source &, const KeyValueConfigFileOptions &, const Defaults & = Defaults(),
bool (* is_incremental) (const std::string &, const KeyValueConfigFile &) = 0);
+
~KeyValueConfigFile();
///\}
diff --git a/paludis/config_file.se b/paludis/config_file.se
index 04d81a7..e997777 100644
--- a/paludis/config_file.se
+++ b/paludis/config_file.se
@@ -16,7 +16,32 @@ make_enum_LineConfigFileOption()
*
* \see LineConfigFile
* \see LineConfigFileOptions
- * \ingroup grpconfigfile
+ * \ingroup grplineconfigfile
+ */
+END
+}
+
+make_enum_KeyValueConfigFileOption()
+{
+ prefix kvcfo
+
+ key kvcfo_disallow_continuations "Do not recognise line continuations"
+ key kvcfo_disallow_comments "Do not recognise comments"
+ key kvcfo_disallow_space_around_equals "Do not allow spaces around equals"
+ key kvcfo_disallow_space_inside_unquoted_values "Do not allow spaces inside unquoted values"
+ key kvcfo_disallow_single_quoted_strings "Do not allow single quoted strings"
+ key kvcfo_disallow_double_quoted_strings "Do not allow double quoted strings"
+ key kvcfo_disallow_unquoted_values "Do not allow unquoted values"
+ key kvcfo_disallow_variables "Do not allow variable expansions"
+ key kvcfo_disallow_source "Do not allow the source command"
+
+ doxygen_comment << "END"
+ /**
+ * Options for a KeyValueConfigFile.
+ *
+ * \see KeyValueConfigFile
+ * \see KeyValueConfigFileOptions
+ * \ingroup grpkeyvalueconfigfile
*/
END
}
diff --git a/paludis/config_file_TEST.cc b/paludis/config_file_TEST.cc
index df56983..022fe16 100644
--- a/paludis/config_file_TEST.cc
+++ b/paludis/config_file_TEST.cc
@@ -175,7 +175,7 @@ namespace test_cases
s << "three=" << std::endl;
s << "four = \"fourth\" " << std::endl;
s << "five = ''" << std::endl;
- KeyValueConfigFile ff(s);
+ KeyValueConfigFile ff(s, KeyValueConfigFileOptions());
TEST_CHECK_EQUAL(ff.get("one"), "first");
TEST_CHECK_EQUAL(ff.get("two"), "second");
@@ -200,7 +200,7 @@ namespace test_cases
s << "one='first" << std::endl;
s << " first " << std::endl;
s << "first'" << std::endl;
- KeyValueConfigFile ff(s);
+ KeyValueConfigFile ff(s, KeyValueConfigFileOptions());
TEST_CHECK_EQUAL(ff.get("one"), "first\n first \nfirst");
}
@@ -220,7 +220,7 @@ namespace test_cases
s << "x=foo" << std::endl;
s << "y = \"${x}\\\\${y}\\$${z}\"" << std::endl;
s << "z = $x$y$z" << std::endl;
- KeyValueConfigFile ff(s);
+ KeyValueConfigFile ff(s, KeyValueConfigFileOptions());
TEST_CHECK_EQUAL(ff.get("x"), "foo");
TEST_CHECK_EQUAL(ff.get("y"), "foo\\$");
@@ -239,7 +239,7 @@ namespace test_cases
t << "f = " << std::endl;
t << "g = foo \\" << std::endl;
t << " bar" << std::endl;
- KeyValueConfigFile fg(t, KeyValueConfigFile::Defaults(t_defs));
+ KeyValueConfigFile fg(t, KeyValueConfigFileOptions(), KeyValueConfigFile::Defaults(t_defs));
TEST_CHECK_EQUAL(fg.get("a"), "foo");
TEST_CHECK_EQUAL(fg.get("b"), "foo");
@@ -261,12 +261,12 @@ namespace test_cases
std::stringstream d_s;
d_s << "foo=oink" << std::endl;
- std::tr1::shared_ptr<KeyValueConfigFile> d_ff(new KeyValueConfigFile(d_s, &getenv_with_default));
+ std::tr1::shared_ptr<KeyValueConfigFile> d_ff(new KeyValueConfigFile(d_s, KeyValueConfigFileOptions(), &getenv_with_default));
std::stringstream s;
s << "x=${foo}" << std::endl;
s << "y=${moo}" << std::endl;
- KeyValueConfigFile ff(s, d_ff);
+ KeyValueConfigFile ff(s, KeyValueConfigFileOptions(), d_ff);
TEST_CHECK_EQUAL(ff.get("x"), "oink");
TEST_CHECK_EQUAL(ff.get("y"), "cow");
@@ -284,7 +284,7 @@ namespace test_cases
d_s << "seven=\"spider\"" << std::endl;
d_s << "source config_file_TEST_dir/sourced_one" << std::endl;
d_s << "eight=\"octopus\"" << std::endl;
- KeyValueConfigFile ff(d_s);
+ KeyValueConfigFile ff(d_s, KeyValueConfigFileOptions());
TEST_CHECK_EQUAL(ff.get("one"), "cat");
TEST_CHECK_EQUAL(ff.get("two"), "dog");
@@ -309,39 +309,39 @@ namespace test_cases
{
std::stringstream s1;
s1 << "x='" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s1), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s1, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s2;
s2 << "x='moo\"" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s2), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s2, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s3;
s3 << "x=${foo" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s3), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s3, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s4;
s4 << "x=$~" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s4), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s4, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s5;
s5 << "x=abc\\" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s5), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s5, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s6;
s6 << "x=$" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s6), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s6, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s7;
s7 << "x=blah \\" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s7), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s7, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s8;
s8 << "x=blah \\" << std::endl << "# foo" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s8), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s8, KeyValueConfigFileOptions()), ConfigurationError);
std::stringstream s9;
s9 << "x='blah" << std::endl << "blah" << std::endl;
- TEST_CHECK_THROWS(KeyValueConfigFile ff(s9), ConfigurationError);
+ TEST_CHECK_THROWS(KeyValueConfigFile ff(s9, KeyValueConfigFileOptions()), ConfigurationError);
}
} test_key_value_config_file_errors;
}
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 75d7392..4f9d6ce 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -159,7 +159,7 @@ namespace paludis
return;
}
- KeyValueConfigFile f(FSEntry(config_dir) / "environment.conf");
+ KeyValueConfigFile f(FSEntry(config_dir) / "environment.conf", KeyValueConfigFileOptions());
if (! f.get("reduced_username").empty())
{
reduced_username = f.get("reduced_username");
@@ -325,7 +325,7 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
if ((local_config_dir / "specpath").exists())
{
- KeyValueConfigFile specpath(local_config_dir / "specpath");
+ KeyValueConfigFile specpath(local_config_dir / "specpath", KeyValueConfigFileOptions());
root_prefix = specpath.get("root");
local_config_suffix = specpath.get("config-suffix");
@@ -378,7 +378,7 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
if ((local_config_dir / "repository_defaults.conf").exists())
{
- KeyValueConfigFile defaults_file(local_config_dir / "repository_defaults.conf");
+ KeyValueConfigFile defaults_file(local_config_dir / "repository_defaults.conf", KeyValueConfigFileOptions());
std::copy(defaults_file.begin(), defaults_file.end(),
conf_vars->inserter());
}
@@ -403,7 +403,7 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
{
Context local_context("When reading repository file '" + stringify(*repo_file) + "':");
- KeyValueConfigFile k(*repo_file, KeyValueConfigFile::Defaults(conf_vars));
+ KeyValueConfigFile k(*repo_file, KeyValueConfigFileOptions(), KeyValueConfigFile::Defaults(conf_vars));
std::string format(k.get("format"));
if (format.empty())
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index ed41c73..432e8e8 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -156,12 +156,12 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
"guaranteed; issues should be reported via trac. You are strongly encouraged "
"to migrate to a Paludis configuration.");
- _imp->vars.reset(new KeyValueConfigFile(FSEntry("/dev/null")));
+ _imp->vars.reset(new KeyValueConfigFile(FSEntry("/dev/null"), KeyValueConfigFileOptions()));
_load_profile((_imp->conf_dir / "make.profile").realpath());
if ((_imp->conf_dir / "make.globals").exists())
- _imp->vars.reset(new KeyValueConfigFile(_imp->conf_dir / "make.globals", _imp->vars, &is_incremental));
+ _imp->vars.reset(new KeyValueConfigFile(_imp->conf_dir / "make.globals", KeyValueConfigFileOptions(), _imp->vars, &is_incremental));
if ((_imp->conf_dir / "make.conf").exists())
- _imp->vars.reset(new KeyValueConfigFile(_imp->conf_dir / "make.conf", _imp->vars,
+ _imp->vars.reset(new KeyValueConfigFile(_imp->conf_dir / "make.conf", KeyValueConfigFileOptions(), _imp->vars,
&is_incremental_excluding_use_expand));
/* TODO: load USE etc from env? */
@@ -325,7 +325,7 @@ PortageEnvironment::_load_profile(const FSEntry & d)
}
if ((d / "make.defaults").exists())
- _imp->vars.reset(new KeyValueConfigFile(d / "make.defaults", _imp->vars, &is_incremental));
+ _imp->vars.reset(new KeyValueConfigFile(d / "make.defaults", KeyValueConfigFileOptions(), _imp->vars, &is_incremental));
}
void
diff --git a/paludis/repositories/gentoo/ebin_entries.cc b/paludis/repositories/gentoo/ebin_entries.cc
index b9ea1f0..b424977 100644
--- a/paludis/repositories/gentoo/ebin_entries.cc
+++ b/paludis/repositories/gentoo/ebin_entries.cc
@@ -71,7 +71,9 @@ EbinEntries::generate_version_metadata(const QualifiedPackageName & q,
std::tr1::shared_ptr<EbinVersionMetadata> result(new EbinVersionMetadata(SlotName("unset")));
KeyValueConfigFile f(_imp->params.location / stringify(q.category) /
- stringify(q.package) / (stringify(q.package) + "-" + stringify(v) + ".ebin"));
+ stringify(q.package) / (stringify(q.package) + "-" + stringify(v) + ".ebin"),
+ KeyValueConfigFileOptions() + kvcfo_disallow_continuations + kvcfo_disallow_comments +
+ kvcfo_disallow_space_around_equals + kvcfo_disallow_source);
result->run_depend_string = f.get("RDEPEND");
result->post_depend_string = f.get("PDEPEND");
diff --git a/paludis/repositories/gentoo/ebuild.cc b/paludis/repositories/gentoo/ebuild.cc
index 522671d..16ae2b2 100644
--- a/paludis/repositories/gentoo/ebuild.cc
+++ b/paludis/repositories/gentoo/ebuild.cc
@@ -177,7 +177,8 @@ bool
EbuildMetadataCommand::do_run_command(const Command & cmd)
{
PStream prog(cmd);
- KeyValueConfigFile f(prog);
+ KeyValueConfigFile f(prog, KeyValueConfigFileOptions() + kvcfo_disallow_continuations + kvcfo_disallow_comments
+ + kvcfo_disallow_space_around_equals + kvcfo_disallow_space_inside_unquoted_values + kvcfo_disallow_unquoted_values);
_metadata.reset(new EbuildVersionMetadata);
bool ok(false);
diff --git a/paludis/repositories/gentoo/portage_repository_profile.cc b/paludis/repositories/gentoo/portage_repository_profile.cc
index af748d8..9572520 100644
--- a/paludis/repositories/gentoo/portage_repository_profile.cc
+++ b/paludis/repositories/gentoo/portage_repository_profile.cc
@@ -258,7 +258,8 @@ Implementation<PortageRepositoryProfile>::load_profile_make_defaults(const FSEnt
if (! (dir / "make.defaults").exists())
return;
- KeyValueConfigFile file(dir / "make.defaults");
+ KeyValueConfigFile file(dir / "make.defaults", KeyValueConfigFileOptions() +
+ kvcfo_disallow_space_around_equals + kvcfo_disallow_space_inside_unquoted_values);
for (KeyValueConfigFile::Iterator k(file.begin()), k_end(file.end()) ;
k != k_end ; ++k)