Skip to content

Commit bfe3487

Browse files
authored
Merge pull request #1577 from JvdGlind/hidden_visibility_support_macos
export http_exception for non Windows builds
2 parents 0ddc618 + 8044480 commit bfe3487

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Release/include/cpprest/details/cpprest_compat.h

+8
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,20 @@
7171

7272
#ifdef _NO_ASYNCRTIMP
7373
#define _ASYNCRTIMP
74+
#define _ASYNCRTIMP_TYPEINFO
7475
#else // ^^^ _NO_ASYNCRTIMP ^^^ // vvv !_NO_ASYNCRTIMP vvv
7576
#ifdef _ASYNCRT_EXPORT
7677
#define _ASYNCRTIMP __declspec(dllexport)
7778
#else // ^^^ _ASYNCRT_EXPORT ^^^ // vvv !_ASYNCRT_EXPORT vvv
7879
#define _ASYNCRTIMP __declspec(dllimport)
7980
#endif // _ASYNCRT_EXPORT
81+
82+
#if defined(_WIN32)
83+
#define _ASYNCRTIMP_TYPEINFO
84+
#else // ^^^ _WIN32 ^^^ // vvv !_WIN32 vvv
85+
#define _ASYNCRTIMP_TYPEINFO __attribute__((visibility("default")))
86+
#endif // _WIN32
87+
8088
#endif // _NO_ASYNCRTIMP
8189

8290
#ifdef CASABLANCA_DEPRECATION_NO_WARNINGS

Release/include/cpprest/http_msg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class header_names
187187
/// <summary>
188188
/// Represents an HTTP error. This class holds an error message and an optional error code.
189189
/// </summary>
190-
class http_exception : public std::exception
190+
class _ASYNCRTIMP_TYPEINFO http_exception : public std::exception
191191
{
192192
public:
193193
/// <summary>

0 commit comments

Comments
 (0)