Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehan Monnier committed Apr 24, 2024
1 parent 8906a7c commit 2fe7edb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion include/bctoolbox/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ typedef unsigned int uint32_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef __int16 int16_t;
typedef long ssize_t;
/*SSIZE_T is defined in Microsoft SDKs/Windows/v7.0A/Include/BaseTsd.h*/
typedef SSIZE_T ssize_t;

#else
#include <io.h>
#include <stdint.h> /*provided by mingw32*/
Expand Down
8 changes: 6 additions & 2 deletions src/utils/exception.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ BctbxException::BctbxException(const std::string &message) : mSize(0) {
#endif
set_terminate(uncaught_handler); // invoke in case of uncautch exception for this thread
#endif
/* Warn about exception as soon as it is created. Exceptions are not usual events. */
BCTBX_SLOGW << "BctbxException occurred: " << mOs.str();

#ifndef HAVE_EXECINFO
/* Warn about exception as soon as it is created. Exceptions are not usual events and may be difficult to locate if
* stacktrace is not available. */
BCTBX_SLOGW << "BctbxException occurred at : " << mOs.str();
#endif
}

BctbxException::BctbxException(const BctbxException &other) : mSize(other.mSize) {
Expand Down

0 comments on commit 2fe7edb

Please sign in to comment.