Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions libcxx/include/__random/binomial_distribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ class _LIBCPP_TEMPLATE_VIS binomial_distribution {
}
};

#ifndef _LIBCPP_MSVCRT_LIKE
extern "C" double lgamma_r(double, int*);
#endif

inline _LIBCPP_HIDE_FROM_ABI double __libcpp_lgamma(double __d) {
#if defined(_LIBCPP_MSVCRT_LIKE)
return lgamma(__d);
Expand Down
7 changes: 7 additions & 0 deletions libcxx/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ long double truncl(long double x);
# pragma GCC system_header
# endif

// This is required to define functions like lgamma_r on Apple platforms.
// These functions are not required by the Standard but our implementation
// uses them.
# if defined(__APPLE__) && !defined(_REENTRANT)
# define _REENTRANT
# endif

# if __has_include_next(<math.h>)
# include_next <math.h>
# endif
Expand Down