* Set minimum compatibility version in compiler options.
* Refactor existing 10.5 support so that when 10.4 support is
deprecated and we're building on 10.6+, everything will continue to
work.
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c darwin-dlshim.c darwin-langinfo.c
OS_LIBS = -lSystem -lc
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-dlshim.c darwin-langinfo.c
OS_LIBS = -lSystem -lc -ldl
ifdef LISP_FEATURE_SB_THREAD
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c darwin-dlshim.c darwin-langinfo.c
OS_LIBS = -lSystem -lc -ldl
ifdef LISP_FEATURE_SB_THREAD
#include <mach/mach_init.h>
#include <mach/task.h>
#include <AvailabilityMacros.h>
+#include <sys/cdefs.h>
/* man pages claim that the third argument is a sigcontext struct,
but ucontext_t is defined, matches sigcontext where sensible,
#if defined(LISP_FEATURE_X86)
#include <sys/ucontext.h>
#include <sys/_types.h>
-#ifdef MAC_OS_X_VERSION_10_5
+
+#if __DARWIN_UNIX03
typedef struct __darwin_ucontext os_context_t;
#else
typedef struct ucontext os_context_t;
#ifndef _PPC_DARWIN_OS_H
#define _PPC_DARWIN_OS_H
+#include "darwin-os.h"
+
typedef unsigned int os_context_register_t;
static inline os_context_t *arch_os_get_context(void **void_context)
{
return (os_context_t *) *void_context;
}
-/* As of XCode 3.0, the field names for the thread state have changed
- * and now are prepended with __. Use some #define hackery to deal
- * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if
- * we need the new style field names.
+/* On OS X 10.5, the field names for the thread state have changed and
+ * now are prepended with __. Use some #define hackery to deal with
+ * this.
*/
-#if MAC_OS_X_VERSION_10_5
+#if __DARWIN_UNIX03
#define PPC_DARWIN_REGIFY(foo) __ ## foo
typedef ppc_saved_state_t ppc_ss_struct_t;
-#endif /* MAC_OS_X_VERSION_10_5 */
+#endif /* __DARWIN_UNIX03 */
#endif /* _PPC_DARWIN_OS_H */
#elif defined __FreeBSD__
return &context->uc_mcontext.mc_rflags;
#elif defined LISP_FEATURE_DARWIN
-#ifdef MAC_OS_X_VERSION_10_5
- return &context->uc_mcontext->__ss.__rflags;
-#else
- return &context->uc_mcontext->ss.rflags;
-#endif
+ return CONTEXT_ADDR_FROM_STEM(rflags);
#elif defined __OpenBSD__
return &context->sc_eflags;
#else
#include <stdlib.h>
#include <stdio.h>
-#ifdef MAC_OS_X_VERSION_10_5
+#if __DARWIN_UNIX03
#include <sys/_structs.h>
#endif
-#ifdef MAC_OS_X_VERSION_10_5
+#if __DARWIN_UNIX03
typedef struct __darwin_ucontext darwin_ucontext;
typedef struct __darwin_mcontext64 darwin_mcontext;
return (os_context_t *) *void_context;
}
-#ifdef MAC_OS_X_VERSION_10_5
+#if __DARWIN_UNIX03
#define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->__ss.__##stem
#else
#define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->ss.stem
-#endif
+#endif /* __DARWIN_UNIX03 */
#endif /* _X86_64_DARWIN_OS_H */
*/
os_context_t *context;
-#if MAC_OS_X_VERSION_10_5
- struct __darwin_mcontext32 *regs;
-#else
- struct mcontext *regs;
-#endif
+ mcontext_t *regs;
context = (os_context_t*) os_validate(0, sizeof(os_context_t));
-#if MAC_OS_X_VERSION_10_5
- regs = (struct __darwin_mcontext32*) os_validate(0, sizeof(struct __darwin_mcontext32));
-#else
- regs = (struct mcontext*) os_validate(0, sizeof(struct mcontext));
-#endif
+ regs = (mcontext_t*) os_validate(0, sizeof(mcontext_t));
context->uc_mcontext = regs;
/* when BSD signals are fired, they mask they signals in sa_mask
update_thread_state_from_context(thread_state, float_state, context);
os_invalidate((os_vm_address_t)context, sizeof(os_context_t));
-#if MAC_OS_X_VERSION_10_5
- os_invalidate((os_vm_address_t)regs, sizeof(struct __darwin_mcontext32));
-#else
- os_invalidate((os_vm_address_t)regs, sizeof(struct mcontext));
-#endif
+ os_invalidate((os_vm_address_t)regs, sizeof(mcontext_t));
/* Trap to restore the signal context. */
asm volatile ("movl %0, %%eax; movl %1, %%ebx; .long 0xffff0b0f"
void set_data_desc_size(data_desc_t* desc, unsigned long size);
void set_data_desc_addr(data_desc_t* desc, void* addr);
-/* As of XCode 3.0, the field names for the thread state have changed
- * and now are prepended with __. Use some #define hackery to deal
- * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if
- * we need the new style field names.
+/* On OS X 10.5, the field names for the thread state have changed and
+ * now are prepended with __. Use some #define hackery to deal with
+ * this.
*/
-#if MAC_OS_X_VERSION_10_5
+#if __DARWIN_UNIX03
#define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->__ss.__##stem
#define EIP __eip
#define SS ss
#define GS gs
-#endif /* MAC_OS_X_VERSION_10_5 */
+#endif /* __DARWIN_UNIX03 */
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.21.11"
+"1.0.21.12"