From c4b7e58882e53f21fc43d94b7f3c777b23bc35bb Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Feb 2012 14:51:09 +0100 Subject: [PATCH] * include/grub/dl.h: Switch from APPLE_CC to __APPLE__. (GRUB_MOD_LICENSE) [ASM_FILE]: Make into macro. All users updated. --- ChangeLog | 5 +++++ grub-core/lib/i386/setjmp.S | 2 +- grub-core/lib/ia64/setjmp.S | 2 +- grub-core/lib/mips/setjmp.S | 2 +- grub-core/lib/powerpc/setjmp.S | 2 +- grub-core/lib/sparc64/setjmp.S | 2 +- grub-core/lib/x86_64/setjmp.S | 2 +- include/grub/dl.h | 22 ++++++++++++++++------ 8 files changed, 27 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 479b4fc09..d42bcfd3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * include/grub/dl.h: Switch from APPLE_CC to __APPLE__. + (GRUB_MOD_LICENSE) [ASM_FILE]: Make into macro. All users updated. + 2012-02-29 Vladimir Serbinenko * include/grub/symbol.h (EXT_C) [!ASM_FILE]: Redefine with strings. diff --git a/grub-core/lib/i386/setjmp.S b/grub-core/lib/i386/setjmp.S index 5b7aa158b..0b0740f11 100644 --- a/grub-core/lib/i386/setjmp.S +++ b/grub-core/lib/i386/setjmp.S @@ -21,7 +21,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv3+") +GRUB_MOD_LICENSE "GPLv3+" .text diff --git a/grub-core/lib/ia64/setjmp.S b/grub-core/lib/ia64/setjmp.S index 190623d35..dc19be0ce 100644 --- a/grub-core/lib/ia64/setjmp.S +++ b/grub-core/lib/ia64/setjmp.S @@ -69,7 +69,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv2+") +GRUB_MOD_LICENSE "GPLv2+" /* The following two entry points are the traditional entry points: */ diff --git a/grub-core/lib/mips/setjmp.S b/grub-core/lib/mips/setjmp.S index 8259c9d22..f01294518 100644 --- a/grub-core/lib/mips/setjmp.S +++ b/grub-core/lib/mips/setjmp.S @@ -21,7 +21,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv3+") +GRUB_MOD_LICENSE "GPLv3+" .text diff --git a/grub-core/lib/powerpc/setjmp.S b/grub-core/lib/powerpc/setjmp.S index 8c7540e3c..c301a7b07 100644 --- a/grub-core/lib/powerpc/setjmp.S +++ b/grub-core/lib/powerpc/setjmp.S @@ -21,7 +21,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv3+") +GRUB_MOD_LICENSE "GPLv3+" .text diff --git a/grub-core/lib/sparc64/setjmp.S b/grub-core/lib/sparc64/setjmp.S index 5c2ec2cf3..ec9c53057 100644 --- a/grub-core/lib/sparc64/setjmp.S +++ b/grub-core/lib/sparc64/setjmp.S @@ -21,7 +21,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv3+") +GRUB_MOD_LICENSE "GPLv3+" .text diff --git a/grub-core/lib/x86_64/setjmp.S b/grub-core/lib/x86_64/setjmp.S index b1f1b22cb..6b151bc4d 100644 --- a/grub-core/lib/x86_64/setjmp.S +++ b/grub-core/lib/x86_64/setjmp.S @@ -21,7 +21,7 @@ .file "setjmp.S" -GRUB_MOD_LICENSE ("GPLv3+") +GRUB_MOD_LICENSE "GPLv3+" .text diff --git a/include/grub/dl.h b/include/grub/dl.h index 19450d5da..3119978f1 100644 --- a/include/grub/dl.h +++ b/include/grub/dl.h @@ -77,13 +77,13 @@ grub_mod_fini (void) #endif #ifndef ASM_FILE -#ifdef APPLE_CC +#ifdef __APPLE__ #define GRUB_MOD_SECTION(x) "_" #x ", _" #x "" #else #define GRUB_MOD_SECTION(x) "." #x #endif #else -#ifdef APPLE_CC +#ifdef __APPLE__ #define GRUB_MOD_SECTION(x) _ ## x , _ ##x #else #define GRUB_MOD_SECTION(x) . ## x @@ -114,11 +114,21 @@ static const char grub_module_name_##name[] \ static const char grub_module_depend_##name[] \ __attribute__((section(GRUB_MOD_SECTION(moddeps)), __used__)) = #name #else -#define GRUB_MOD_LICENSE(license) \ - .section GRUB_MOD_SECTION(module_license), "a"; \ - .ascii "LICENSE="; \ - .ascii license; \ +#ifdef __APPLE__ +.macro GRUB_MOD_LICENSE + .section GRUB_MOD_SECTION(module_license) + .ascii "LICENSE=" + .ascii $0 .byte 0 +.endm +#else +.macro GRUB_MOD_LICENSE license + .section GRUB_MOD_SECTION(module_license), "a" + .ascii "LICENSE=" + .ascii "\license" + .byte 0 +.endm +#endif #endif /* Under GPL license obligations you have to distribute your module