Skip to content

Commit

Permalink
Merge pull request #1577 from JvdGlind/hidden_visibility_support_macos
Browse files Browse the repository at this point in the history
export http_exception for non Windows builds
  • Loading branch information
barcharcraz committed Mar 11, 2021
2 parents 0ddc618 + 8044480 commit bfe3487
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Release/include/cpprest/details/cpprest_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,20 @@

#ifdef _NO_ASYNCRTIMP
#define _ASYNCRTIMP
#define _ASYNCRTIMP_TYPEINFO
#else // ^^^ _NO_ASYNCRTIMP ^^^ // vvv !_NO_ASYNCRTIMP vvv
#ifdef _ASYNCRT_EXPORT
#define _ASYNCRTIMP __declspec(dllexport)
#else // ^^^ _ASYNCRT_EXPORT ^^^ // vvv !_ASYNCRT_EXPORT vvv
#define _ASYNCRTIMP __declspec(dllimport)
#endif // _ASYNCRT_EXPORT

#if defined(_WIN32)
#define _ASYNCRTIMP_TYPEINFO
#else // ^^^ _WIN32 ^^^ // vvv !_WIN32 vvv
#define _ASYNCRTIMP_TYPEINFO __attribute__((visibility("default")))
#endif // _WIN32

#endif // _NO_ASYNCRTIMP

#ifdef CASABLANCA_DEPRECATION_NO_WARNINGS
Expand Down
2 changes: 1 addition & 1 deletion Release/include/cpprest/http_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class header_names
/// <summary>
/// Represents an HTTP error. This class holds an error message and an optional error code.
/// </summary>
class http_exception : public std::exception
class _ASYNCRTIMP_TYPEINFO http_exception : public std::exception
{
public:
/// <summary>
Expand Down

0 comments on commit bfe3487

Please sign in to comment.