On 21.02.2012 17:19, Lennart Sorensen wrote:
On Tue, Feb 21, 2012 at 05:12:12PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
Hello, it's to announce that from 27th of February the GRUB will be
frozen for 2.00 release. From that date on, no new features will be
committed only bugfixes.
If you have a patch which you think should be included in 2.00 you
can ping me about it but I might answer that it's postponed after
2.00
@Richard Laager: Which of ZFS patches aren't committed yet? It's a
bit tricky to see which ones were superseeded.
Any chance all these warnings will get fixed so powerpc can compile
without using --disable-werror?

At this point I can't figure out what to do to convince gcc that aliasing
the list structure should be allowed.  It looks like the way lists are
done in grub is simply a big hack that gcc doesn't like.

Try attached patch


--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/kern/list.c'
--- grub-core/kern/list.c	2012-02-12 02:52:17 +0000
+++ grub-core/kern/list.c	2012-02-12 02:52:48 +0000
@@ -32,3 +32,24 @@
 
   return NULL;
 }
+
+void
+grub_list_push (grub_list_t *head, grub_list_t item)
+{
+  item->prev = head;
+  if (*head)
+    (*head)->prev = &item->next;
+  item->next = *head;
+  *head = item;
+}
+
+void
+grub_list_remove (grub_list_t item)
+{
+  if (item->prev)
+    *item->prev = item->next;
+  if (item->next)
+    item->next->prev = item->prev;
+  item->next = 0;
+  item->prev = 0;
+}

=== modified file 'include/grub/list.h'
--- include/grub/list.h	2012-02-12 02:52:17 +0000
+++ include/grub/list.h	2012-02-12 02:53:20 +0000
@@ -31,26 +31,8 @@
 };
 typedef struct grub_list *grub_list_t;
 
-static inline void
-grub_list_push (grub_list_t *head, grub_list_t item)
-{
-  item->prev = head;
-  if (*head)
-    (*head)->prev = &item->next;
-  item->next = *head;
-  *head = item;
-}
-
-static inline void
-grub_list_remove (grub_list_t item)
-{
-  if (item->prev)
-    *item->prev = item->next;
-  if (item->next)
-    item->next->prev = item->prev;
-  item->next = 0;
-  item->prev = 0;
-}
+void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
+void EXPORT_FUNC(grub_list_remove) (grub_list_t item);
 
 #define FOR_LIST_ELEMENTS(var, list) for ((var) = (list); (var); (var) = (var)->next)
 

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to