stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r553286 - /incubator/stdcxx/trunk/util/locale.cpp
Date Wed, 04 Jul 2007 18:07:15 GMT
Author: faridz
Date: Wed Jul  4 11:07:15 2007
New Revision: 553286

URL: http://svn.apache.org/viewvc?view=rev&rev=553286
Log:
2007-07-04 Farid Zaripov <Farid_Zaripov@epam.com>

	* locale.cpp: Use "dir /B" command on Windows instead of "ls -1"

Modified:
    incubator/stdcxx/trunk/util/locale.cpp

Modified: incubator/stdcxx/trunk/util/locale.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/locale.cpp?view=diff&rev=553286&r1=553285&r2=553286
==============================================================================
--- incubator/stdcxx/trunk/util/locale.cpp (original)
+++ incubator/stdcxx/trunk/util/locale.cpp Wed Jul  4 11:07:15 2007
@@ -34,6 +34,14 @@
 #include <rw/_defs.h>
 #include _RWSTD_SYS_TYPES_H
 
+#if _RWSTD_PATH_SEP == '/'
+#  define SLASH      "/"
+#  define LS_1       "ls -1 "
+#else
+#  define SLASH      "\\"
+#  define LS_1       "dir /B "
+#endif
+
 #ifndef _MSC_VER
 #  include <sys/mman.h>   // for mmap()
 #  include <unistd.h>     // for close ()
@@ -2362,7 +2370,7 @@
     const char* const locale_root = std::getenv ("RWSTD_LOCALE_ROOT");
 
     if (0 != locale_root) {
-        const std::string cmd = std::string ("ls -1 ") + locale_root;
+        const std::string cmd = std::string (LS_1) + locale_root;
 
         std::system (cmd.c_str ());
     }
@@ -2377,7 +2385,7 @@
 
     if (0 != locale_root) {
         const std::string cmd =
-            std::string ("ls -1 ") + locale_root + "/charmaps";
+            std::string (LS_1) + locale_root + SLASH "charmaps";
 
         std::system (cmd.c_str());
     }



Mime
View raw message