Skip to content
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

Small changes to fix building on OS X. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion lzhamdecomp/lzham_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void lzham_debug_break(void)
{
#if LZHAM_USE_WIN32_API
DebugBreak();
#elif (TARGET_OS_MAC == 1) && (TARGET_IPHONE_SIMULATOR == 0) && (TARGET_OS_IPHONE == 0)
#elif (TARGET_OS_MAC == 1) && (TARGET_IPHONE_SIMULATOR == 0) && (TARGET_OS_IPHONE == 0) && !defined(__clang__)
__asm {int 3}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline assembly should probably just be replaced by a call to __builtin_trap. Then the && !defined(__clang__) I added could be removed.

#else
assert(0);
Expand Down
4 changes: 3 additions & 1 deletion lzhamdecomp/lzham_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ namespace lzham
// Defines type Q as bitwise copyable.
#define LZHAM_DEFINE_BITWISE_COPYABLE(Q) template<> struct bitwise_copyable<Q> { enum { cFlag = true }; };

#if defined(__APPLE__) || defined(__NetBSD__)
#if defined(__APPLE__)
#define LZHAM_IS_POD(T) std::is_pod<T>::value
#elif defined(__NetBSD__)
#define LZHAM_IS_POD(T) std::__is_pod<T>::__value
#else
#define LZHAM_IS_POD(T) __is_pod(T)
Expand Down