Author: sebor
Date: Mon Feb 19 14:32:55 2007
New Revision: 509359
URL: http://svn.apache.org/viewvc?view=rev&rev=509359
Log:
2007-02-19 Mark Brown <[EMAIL PROTECTED]>
STDCXX-340
* aliases.cpp (get_installed_locales): Avoided aborting on locale
(or system) error and instead just issued a warning and continued.
Modified:
incubator/stdcxx/trunk/util/aliases.cpp
Modified: incubator/stdcxx/trunk/util/aliases.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/aliases.cpp?view=diff&rev=509359&r1=509358&r2=509359
==============================================================================
--- incubator/stdcxx/trunk/util/aliases.cpp (original)
+++ incubator/stdcxx/trunk/util/aliases.cpp Mon Feb 19 14:32:55 2007
@@ -32,9 +32,12 @@
# include <sys/types.h>
#endif // __linux__
+#include "diagnostic.h"
+
#include <rw/_defs.h>
#include <cassert> // for assert()
+#include <cerrno> // for errno
#include <cstdlib>
#include <cstdio>
#include <cstring> // for memcpy(), strlen()
@@ -588,11 +591,9 @@
const int ret = std::system (cmd);
- if (ret && ret != 256) {
- std::strcpy (slocname, "call to system ");
- std::perror (std::strcat (slocname, cmd));
- std::abort ();
- }
+ if (ret)
+ issue_diag (W_NOTSUP, false, 0, "call to system(\"%s\") failed: %s\n",
+ cmd, std::strerror (errno));
// open file containing the list of installed locales
std::FILE *f = std::fopen (fname, "r");