tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

06_mingw_copy_s.patch (1112B)


      1 # HG changeset patch
      2 # User Tom Ritter <tom@mozilla.com>
      3 # Date 1516394893 21600
      4 #      Fri Jan 19 14:48:13 2018 -0600
      5 # Node ID bd0817bb5b0c5681c4c49817363e6ddd6efac82c
      6 # Parent  c64ea5b2e26b203eff2f0b9d85fef99ae3a094f9
      7 Bug 1431825 Map _Copy_s to copy for basic_string compatibility on MinGW r?bobowen
      8 
      9 diff --git a/sandbox/win/src/sandbox_types.h b/sandbox/win/src/sandbox_types.h
     10 --- a/sandbox/win/src/sandbox_types.h
     11 +++ b/sandbox/win/src/sandbox_types.h
     12 @@ -5,16 +5,22 @@
     13 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
     14 
     15 #include "base/memory/raw_ptr.h"
     16 #include "base/process/kill.h"
     17 #include "base/process/launch.h"
     18 
     19 namespace sandbox {
     20 
     21 +#ifdef __MINGW32__
     22 +// Map Microsoft's proprietary more-safe version of copy() back to
     23 +// the std::basic_string method
     24 +#define _Copy_s copy
     25 +#endif
     26 +
     27 // Operation result codes returned by the sandbox API.
     28 //
     29 // Note: These codes are listed in a histogram and any new codes should be added
     30 // at the end. If the underlying type is changed then the forward declaration in
     31 // sandbox_init_win.h must be updated.
     32 //
     33 enum ResultCode : int {
     34   SBOX_ALL_OK = 0,