From e6ad0555e4eefc9e12496d248cd2d5ccd4ac11da Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 28 May 2012 17:49:18 +0200 Subject: [PATCH] * grub-core/efiemu/runtime/efiemu.c: Replace APPLE_CC with __APPLE__. * grub-core/kern/misc.c: Likewise. * grub-core/loader/i386/xnu.c: Likewise. * include/grub/i386/tsc.h: Likewise. * include/grub/symbol.h: Likewise. --- ChangeLog | 8 ++++++++ grub-core/efiemu/runtime/efiemu.c | 2 +- grub-core/kern/misc.c | 6 +++--- grub-core/loader/i386/xnu.c | 4 ++-- include/grub/i386/tsc.h | 4 ++-- include/grub/symbol.h | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67d67dc23..8f516f9a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-05-28 Vladimir Serbinenko + + * grub-core/efiemu/runtime/efiemu.c: Replace APPLE_CC with __APPLE__. + * grub-core/kern/misc.c: Likewise. + * grub-core/loader/i386/xnu.c: Likewise. + * include/grub/i386/tsc.h: Likewise. + * include/grub/symbol.h: Likewise. + 2012-05-28 Vladimir Serbinenko * include/grub/list.h (grub_bad_type_cast_real): Remove return. diff --git a/grub-core/efiemu/runtime/efiemu.c b/grub-core/efiemu/runtime/efiemu.c index 8ca1493ba..84b02cb20 100644 --- a/grub-core/efiemu/runtime/efiemu.c +++ b/grub-core/efiemu/runtime/efiemu.c @@ -46,7 +46,7 @@ grub_efi_status_t efiemu_set_wakeup_time (grub_efi_boolean_t enabled, grub_efi_time_t *time); -#ifdef APPLE_CC +#ifdef __APPLE__ #define PHYSICAL_ATTRIBUTE __attribute__ ((section("_text-physical, _text-physical"))); #else #define PHYSICAL_ATTRIBUTE __attribute__ ((section(".text-physical"))); diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 41b18b9b4..95d46245e 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -137,7 +137,7 @@ grub_puts_ (const char *s) return grub_puts (_(s)); } -#if defined (APPLE_CC) && ! defined (GRUB_UTIL) +#if defined (__APPLE__) && ! defined (GRUB_UTIL) int grub_err_printf (const char *fmt, ...) { @@ -152,7 +152,7 @@ grub_err_printf (const char *fmt, ...) } #endif -#if ! defined (APPLE_CC) && ! defined (GRUB_UTIL) +#if ! defined (__APPLE__) && ! defined (GRUB_UTIL) int grub_err_printf (const char *fmt, ...) __attribute__ ((alias("grub_printf"))); #endif @@ -1112,7 +1112,7 @@ grub_abort (void) grub_exit (); } -#if ! defined (APPLE_CC) && !defined (GRUB_UTIL) +#if ! defined (__APPLE__) && !defined (GRUB_UTIL) /* GCC emits references to abort(). */ void abort (void) __attribute__ ((alias ("grub_abort"))); #endif diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c index 0e4d38f4f..4e5ce0975 100644 --- a/grub-core/loader/i386/xnu.c +++ b/grub-core/loader/i386/xnu.c @@ -132,7 +132,7 @@ guessfsb (void) if (! grub_cpu_is_cpuid_supported ()) return sane_value; -#ifdef APPLE_CC +#ifdef __APPLE__ asm volatile ("movl $0, %%eax\n" #ifdef __x86_64__ "push %%rbx\n" @@ -167,7 +167,7 @@ guessfsb (void) if (max_cpuid < 1) return sane_value; -#ifdef APPLE_CC +#ifdef __APPLE__ asm volatile ("movl $1, %%eax\n" #ifdef __x86_64__ "push %%rbx\n" diff --git a/include/grub/i386/tsc.h b/include/grub/i386/tsc.h index dad9d062d..2442d7e24 100644 --- a/include/grub/i386/tsc.h +++ b/include/grub/i386/tsc.h @@ -29,7 +29,7 @@ grub_get_tsc (void) /* The CPUID instruction is a 'serializing' instruction, and avoids out-of-order execution of the RDTSC instruction. */ -#ifdef APPLE_CC +#ifdef __APPLE__ __asm__ __volatile__ ("xorl %%eax, %%eax\n\t" #ifdef __x86_64__ "push %%rbx\n" @@ -109,7 +109,7 @@ grub_cpu_is_tsc_supported (void) return 0; grub_uint32_t features; -#ifdef APPLE_CC +#ifdef __APPLE__ __asm__ ("movl $1, %%eax\n\t" #ifdef __x86_64__ "push %%rbx\n" diff --git a/include/grub/symbol.h b/include/grub/symbol.h index dcf5ca413..390eb62f2 100644 --- a/include/grub/symbol.h +++ b/include/grub/symbol.h @@ -37,7 +37,7 @@ # define EXT_C(sym) sym #endif -#if defined (APPLE_CC) +#if defined (__APPLE__) #define FUNCTION(x) .globl EXT_C(x) ; EXT_C(x): #define VARIABLE(x) .globl EXT_C(x) ; EXT_C(x): #elif ! defined (__CYGWIN__) && ! defined (__MINGW32__)