Bug 1230910 Map _Copy_s to copy for basic_string compatibility on MinGW
MozReview-Commit-ID: DFA1TWUyCij
--- 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,