Bug 1230910 Map _Copy_s to copy for basic_string compatibility on MinGW draft
authorTom Ritter <tom@mozilla.com>
Wed, 08 Mar 2017 19:06:16 +0000
changeset 496070 f3eee0c07af4ab42cb20909d2565824321b42e7f
parent 496069 7178262520294cc232825e500b6e9dec8731de22
child 496071 3fcd6c24bd15bcd433aa3a4196bff7aef4f16e4f
push id48518
push userbmo:tom@mozilla.com
push dateThu, 09 Mar 2017 19:30:51 +0000
bugs1230910
milestone52.0.1
Bug 1230910 Map _Copy_s to copy for basic_string compatibility on MinGW MozReview-Commit-ID: DFA1TWUyCij
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
@@ -2,16 +2,22 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_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.
 enum ResultCode {
   SBOX_ALL_OK = 0,
   // Error is originating on the win32 layer. Call GetlastError() for more
   // information.
   SBOX_ERROR_GENERIC = 1,
   // An invalid combination of parameters was given to the API.
   SBOX_ERROR_BAD_PARAMS = 2,