Bug 1431825 Map _Copy_s to copy for basic_string compatibility on MinGW draft
authorTom Ritter <tom@mozilla.com>
Fri, 19 Jan 2018 14:48:13 -0600
changeset 2009605 4944c81c5c5718f281e30d5e49bf5e55f424f561
parent 2009604 47cb9f72b9ffee741abea262e12d43e2444c194c
child 2009606 6c7d2da21e54f60e3ef24e3c52ca00e336b55cfc
push id364154
push userbobowencode@gmail.com
push dateMon, 20 May 2019 08:19:54 +0000
treeherdertry@08af4671144a [default view] [failures only]
bugs1431825
milestone68.0a1
Bug 1431825 Map _Copy_s to copy for basic_string compatibility on MinGW
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. If the underlying type is changed then the forward declaration in
 // sandbox_init.h must be updated.
 //
 enum ResultCode : int {
   SBOX_ALL_OK = 0,