ab1574cff1
Rely on closefrom(2) instead of a loop on close(2) to close all opened file descriptors. This greatly improve performances. While here, commit changes to patches generated by make makepatch. With hat: puppet PR: 232538 Reported by: vmiller@verisign.com
12 lines
473 B
C++
12 lines
473 B
C++
--- locale/src/locale.cc.orig 2018-09-29 16:21:31 UTC
|
|
+++ locale/src/locale.cc
|
|
@@ -44,6 +44,9 @@ namespace leatherman { namespace locale
|
|
gen.add_messages_domain(domain);
|
|
}
|
|
|
|
+ if (id.empty())
|
|
+ return g_locales.insert(make_pair(domain, std::locale())).first->second;
|
|
+
|
|
// Ensure creating and adding a new locale is thread-safe.
|
|
try {
|
|
return g_locales.insert(make_pair(domain, gen(id))).first->second;
|