Skip to content

[CF] OpenBSD doesn't have the xlocale header. #2609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2020
Merged
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: 2 additions & 2 deletions CoreFoundation/Base.subproj/CFInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ CF_EXTERN_C_BEGIN

#if TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD

#if !TARGET_OS_CYGWIN && !defined(__linux__)
#if TARGET_OS_MAC || (TARGET_OS_BSD && !defined(__OpenBSD__)) || TARGET_OS_ANDROID
#include <xlocale.h>
#endif // !TARGET_OS_CYGWIN && !defined(__linux__)
#endif // TARGET_OS_MAC || (TARGET_OS_BSD && !defined(__OpenBSD__)) || TARGET_OS_ANDROID

#include <sys/time.h>
#include <signal.h>
Expand Down
8 changes: 6 additions & 2 deletions CoreFoundation/Base.subproj/CoreFoundation_Prefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ bool OSAtomicCompareAndSwap32Barrier( int32_t oldValue, int32_t newValue, volati
void OSMemoryBarrier();
#endif // TARGET_OS_LINUX || TARGET_OS_BSD

#if TARGET_OS_LINUX || TARGET_OS_WIN32
#if TARGET_OS_LINUX || TARGET_OS_WIN32 || defined(__OpenBSD__)
#define strtod_l(a,b,locale) strtod(a,b)
#define strtoul_l(a,b,c,locale) strtoul(a,b,c)
#define strtol_l(a,b,c,locale) strtol(a,b,c)

#define fprintf_l(a,locale,b,...) fprintf(a, b, __VA_ARGS__)
#endif // TARGET_OS_LINUX || TARGET_OS_WIN32
#endif // TARGET_OS_LINUX || TARGET_OS_WIN32 || defined(__OpenBSD__)

#if TARGET_OS_LINUX

Expand Down Expand Up @@ -236,6 +236,10 @@ CF_INLINE uint64_t mach_absolute_time() {
#define CF_PRIVATE extern __attribute__((visibility("hidden")))
#define __strong
#define __weak

#if defined(__OpenBSD__)
#define strtoll_l(a,b,c,locale) strtoll(a,b,c)
#endif
#endif

#if TARGET_OS_LINUX || TARGET_OS_BSD
Expand Down