Advertisement
hamzaalloush

1-mingw-portability.patch

Jun 22nd, 2015
269
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc
  2. index 62aa413..b93c0bc 100644
  3. --- a/src/processor/basic_source_line_resolver.cc
  4. +++ b/src/processor/basic_source_line_resolver.cc
  5. @@ -55,7 +55,7 @@ using std::make_pair;
  6.  
  7.  namespace google_breakpad {
  8.  
  9. -#ifdef _WIN32
  10. +#if defined (_WIN32) && !defined (__MINGW32__)
  11.  #define strtok_r strtok_s
  12.  #define strtoull _strtoui64
  13.  #endif
  14. diff --git a/src/processor/binarystream.cc b/src/processor/binarystream.cc
  15. index bf92225..69177c2 100644
  16. --- a/src/processor/binarystream.cc
  17. +++ b/src/processor/binarystream.cc
  18. @@ -27,7 +27,11 @@
  19.  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  20.  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21.  
  22. +#ifdef __MINGW32__
  23. +#include <winsock.h>
  24. +#else
  25.  #include <arpa/inet.h>
  26. +#endif
  27.  #include <limits.h>
  28.  
  29.  #include <string>
  30. diff --git a/src/processor/cfi_frame_info.cc b/src/processor/cfi_frame_info.cc
  31. index 5106ba0..bcfb170 100644
  32. --- a/src/processor/cfi_frame_info.cc
  33. +++ b/src/processor/cfi_frame_info.cc
  34. @@ -43,7 +43,7 @@
  35.  
  36.  namespace google_breakpad {
  37.  
  38. -#ifdef _WIN32
  39. +#if defined (_WIN32) && !defined (__MINGW32__)
  40.  #define strtok_r strtok_s
  41.  #endif
  42.  
  43. diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
  44. index 08f6465..f241a4b 100644
  45. --- a/src/processor/minidump.cc
  46. +++ b/src/processor/minidump.cc
  47. @@ -42,13 +42,14 @@
  48.  #include <string.h>
  49.  #include <time.h>
  50.  
  51. -#ifdef _WIN32
  52. +#if defined (_WIN32) && !defined (__MINGW32__)
  53.  #include <io.h>
  54.  #define PRIx64 "llx"
  55.  #define PRIx32 "lx"
  56.  #define snprintf _snprintf
  57.  #else  // _WIN32
  58.  #include <unistd.h>
  59. +#include <stdint.h>
  60.  #endif  // _WIN32
  61.  
  62.  #include <fstream>
  63. diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc
  64. index f468120..efa5355 100644
  65. --- a/src/processor/tokenize.cc
  66. +++ b/src/processor/tokenize.cc
  67. @@ -36,7 +36,7 @@
  68.  
  69.  namespace google_breakpad {
  70.  
  71. -#ifdef _WIN32
  72. +#if defined (_WIN32) && !defined (__MINGW32__)
  73.  #define strtok_r strtok_s
  74.  #endif
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement