]> xenbits.xensource.com Git - seabios.git/commitdiff
Add __noreturn define for __attribute__((noreturn)).
authorKevin O'Connor <kevin@koconnor.net>
Fri, 1 Jan 2010 08:04:19 +0000 (03:04 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 1 Jan 2010 18:05:23 +0000 (13:05 -0500)
src/types.h
src/util.h

index cfa47fe89a7fec83445dab92bb9960b297586b19..b2100c1450c5ad44ee7b3b34e7877db210ed5319 100644 (file)
@@ -33,8 +33,9 @@ union u64_u32_u {
 
 #define UNIQSEC __FILE__ "." __stringify(__LINE__)
 
-extern void __force_link_error__only_in_32bit_flat() __attribute__ ((noreturn));
-extern void __force_link_error__only_in_16bit() __attribute__ ((noreturn));
+#define __noreturn __attribute__((noreturn))
+extern void __force_link_error__only_in_32bit_flat() __noreturn;
+extern void __force_link_error__only_in_16bit() __noreturn;
 
 #define __ASM(code) asm(".section .text.asm." UNIQSEC "\n\t" code)
 
index f4593aee41b33c21af897cace58e3bcd21d8b1e3..50cb33645113fb5d071bdd1aeaa678cf66b5c956 100644 (file)
@@ -200,8 +200,7 @@ void check_preempt();
 // output.c
 void debug_serial_setup();
 void panic(const char *fmt, ...)
-    __attribute__ ((format (printf, 1, 2)))
-    __attribute__ ((noreturn));
+    __attribute__ ((format (printf, 1, 2))) __noreturn;
 void printf(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2)));
 void __dprintf(const char *fmt, ...)
@@ -360,7 +359,7 @@ static inline void free(void *data) {
 void mtrr_setup(void);
 
 // romlayout.S
-void reset_vector() __attribute__ ((noreturn));
+void reset_vector() __noreturn;
 
 // misc.c
 extern u8 BiosChecksum;