Bug 1230910 Map _Copy_s to copy for basic_string compatibility on MinGW draft
authorTom Ritter <tom@mozilla.com>
Wed, 30 Aug 2017 09:39:10 -0500
changeset 656090 deb775394291391f7e12c1e6b70b5799186c0732
parent 656089 e66d1c92c3d0bb2d2f3d6604a2a1fe3ec7732c51
child 656091 87d78b3790b298b5d257d1f5a72ea727a85b5fb4
push id77058
push userbmo:tom@mozilla.com
push dateWed, 30 Aug 2017 18:21:00 +0000
bugs1230910
milestone57.0a1
Bug 1230910 Map _Copy_s to copy for basic_string compatibility on MinGW MozReview-Commit-ID: A9tRSDP7td8
security/sandbox/chromium/sandbox/win/src/sandbox_types.h
--- a/security/sandbox/chromium/sandbox/win/src/sandbox_types.h
+++ b/security/sandbox/chromium/sandbox/win/src/sandbox_types.h
@@ -5,16 +5,22 @@
 #ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
 
 #include "base/process/kill.h"
 #include "base/process/launch.h"
 
 namespace sandbox {
 
+#ifdef __MINGW32__
+// Map Microsoft's proprietary more-safe version of copy() back to
+// the std::basic_string method
+#define _Copy_s copy
+#endif
+  
 // Operation result codes returned by the sandbox API.
 //
 // Note: These codes are listed in a histogram and any new codes should be added
 // at the end.
 //
 enum ResultCode : int {
   SBOX_ALL_OK = 0,
   // Error is originating on the win32 layer. Call GetlastError() for more