mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Remove static variable name clashes
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
This commit is contained in:
parent
0419cd2695
commit
85c8be6286
63 changed files with 97 additions and 92 deletions
|
@ -67,7 +67,7 @@ std::vector<string> shellwords(const string & s)
|
|||
return res;
|
||||
}
|
||||
|
||||
static void _main(int argc, char * * argv)
|
||||
static void main_nix_build(int argc, char * * argv)
|
||||
{
|
||||
auto dryRun = false;
|
||||
auto runEnv = std::regex_search(argv[0], std::regex("nix-shell$"));
|
||||
|
@ -540,5 +540,5 @@ static void _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-build", _main);
|
||||
static RegisterLegacyCommand s2("nix-shell", _main);
|
||||
static RegisterLegacyCommand r_nix_build("nix-build", main_nix_build);
|
||||
static RegisterLegacyCommand r_nix_shell("nix-shell", main_nix_build);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue