1414* limitations under the License.
1515*
1616* ==--==
17+ * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
18+ *
19+ * Standard macros and definitions.
20+ * This header has minimal dependency on windows headers and is safe for use in the public API
1721*
1822* For the latest on this and related APIs, please see http://casablanca.codeplex.com.
1923*
20- * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
21- ***/
24+ * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
25+ **** /
2226
2327#pragma once
24- #include < cstdint>
25- #include < sstream>
26- #include < iostream>
2728
28- #if (defined(ANDROID) || defined(__ANDROID__)) && defined(__arm__)
29- // Cdecl is not used on ARM
30- #define __cdecl
29+ #if defined(_WIN32 ) // Settings specific to Windows
30+
31+ #if _MSC_VER >= 1900
32+ #define CPPREST_NOEXCEPT noexcept
3133#else
32- #define __cdecl __attribute__ ((cdecl))
34+ #define CPPREST_NOEXCEPT
3335#endif
3436
37+ #define CASABLANCA_UNREFERENCED_PARAMETER (x ) (x)
38+
39+ #if _MSC_VER >= 1700
40+ // Support VS2012 SAL syntax only
41+ #include <sal.h>
42+ #else
3543#include "cpprest/details/nosal.h"
44+ #endif
3645
37- #define CPPREST_NOEXCEPT noexcept
46+ #else // End settings specific to Windows
3847
39- #define novtable /* no novtable equivalent */
40- #define __declspec (x ) __attribute__ ((x))
48+ // Settings common to all but Windows
4149
42- // ignore these:
50+ #define __declspec ( x ) __attribute__ ((x))
4351#define dllimport
44- #ifdef __LP64__ // ignore cdecl on 64-bit
45- #define cdecl
46- #endif
52+ #define novtable /* no novtable equivalent */
53+ #define __assume (x ) do { if (!(x)) __builtin_unreachable(); } while (false)
54+ #define CASABLANCA_UNREFERENCED_PARAMETER (x ) (void)x
55+ #define CPPREST_NOEXCEPT noexcept
4756
48- #include < stdint.h>
4957#include <assert.h>
58+ #define _ASSERTE (x ) assert(x)
5059
51- #define __assume (x ) do { if (!(x)) __builtin_unreachable (); } while (false )
60+ // No SAL on non Windows platforms
61+ #include "cpprest/details/nosal.h"
5262
53- #define CASABLANCA_UNREFERENCED_PARAMETER (x ) (void )x
54- #define _ASSERTE (x ) assert (x)
63+ #if defined(__APPLE__ ) // Settings specific to Apple
64+ #define __cdecl
65+ #else
5566
56- #ifdef CASABLANCA_DEPRECATION_NO_WARNINGS
57- #define CASABLANCA_DEPRECATED (x )
67+ // Settings specific to Linux and Android
68+
69+ // Ignore cdecl on ANDROID ARM and 64bit
70+ #if defined(__ANDROID__ ) && defined(__arm__ ) || defined(__LP64__ )
71+ #define __cdecl
72+ #else
73+ #define __cdecl __attribute__ ((cdecl))
74+ #endif
75+
76+ #ifdef __clang__
77+ #include <cstdio>
78+ #endif
79+
80+ #endif // defined(__APPLE__)
81+
82+ #endif
83+
84+
85+ #ifdef _NO_ASYNCRTIMP
86+ #define _ASYNCRTIMP
5887#else
59- #define CASABLANCA_DEPRECATED (x ) __attribute__((deprecated(x)))
88+ #ifdef _ASYNCRT_EXPORT
89+ #define _ASYNCRTIMP __declspec(dllexport)
90+ #else
91+ #define _ASYNCRTIMP __declspec(dllimport)
92+ #endif
6093#endif
6194
95+ #ifdef CASABLANCA_DEPRECATION_NO_WARNINGS
96+ #define CASABLANCA_DEPRECATED (x )
97+ #else
98+ #define CASABLANCA_DEPRECATED (x ) __declspec(deprecated(x))
99+ #endif
0 commit comments