Skip to content

Commit

Permalink
RESTINIO_OS_APPLE introduced.
Browse files Browse the repository at this point in the history
  • Loading branch information
eao197 committed Dec 19, 2023
1 parent dc7fb10 commit 4d003e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion dev/restinio/detect_os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@

/*!
* @def RESTINIO_OS_UNIX
* @brief A marker for Unix platforms.
* @brief A marker for Unix platforms, but not macOS/iOS.
*/

/*!
* @def RESTINIO_OS_APPLE
* @brief A marker for macOS/iOS.
*/

#if defined( _WIN64 )
Expand All @@ -45,3 +50,7 @@
#define RESTINIO_OS_UNIX
#endif

#if defined(__APPLE__)
#define RESTINIO_OS_APPLE
#endif

2 changes: 1 addition & 1 deletion dev/restinio/impl/sendfile_operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ make_error_code( const Error_Type & e ) noexcept

#if defined(RESTINIO_OS_WINDOWS)
#include "sendfile_operation_win.ipp"
#elif defined(RESTINIO_OS_UNIX)
#elif defined(RESTINIO_OS_UNIX) || defined(RESTINIO_OS_APPLE)
#include "sendfile_operation_posix.ipp"
#else
#if defined (RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL)
Expand Down
2 changes: 1 addition & 1 deletion dev/restinio/sendfile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#if defined(RESTINIO_OS_WINDOWS)
#include "sendfile_defs_win.hpp"
#elif defined(RESTINIO_OS_UNIX)
#elif defined(RESTINIO_OS_UNIX) || defined(RESTINIO_OS_APPLE)
#include "sendfile_defs_posix.hpp"
#else
#if defined (RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL)
Expand Down

0 comments on commit 4d003e9

Please sign in to comment.