diff -NBbru linux-2.4.6.vanilla/include/linux/list.h linux-2.4.6/include/linux/list.h --- linux-2.4.6.vanilla/include/linux/list.h Fri Feb 16 16:06:17 2001 +++ linux-2.4.6/include/linux/list.h Mon Jul 2 16:14:27 2001 @@ -148,6 +148,10 @@ */ #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) + +#define list_first(head) (((head)->next != (head)) ? (head)->next: (struct list_head *) 0) + +#define list_last(head) (((head)->prev != (head)) ? (head)->prev: (struct list_head *) 0) #endif /* __KERNEL__ || _LVM_H_INCLUDE */ diff -NBbru linux-2.4.6.vanilla/include/linux/macros.h linux-2.4.6/include/linux/macros.h --- linux-2.4.6.vanilla/include/linux/macros.h Wed Dec 31 16:00:00 1969 +++ linux-2.4.6/include/linux/macros.h Wed Jul 4 16:41:31 2001 @@ -0,0 +1,19 @@ +#ifndef _LINUX_MACROS_H +#define _LINUX_MACROS_H + + +#ifndef min +#define min(a, b) (((a) < (b)) ? (a): (b)) +#endif + +#ifndef max +#define max(a, b) (((a) > (b)) ? (a): (b)) +#endif + +#ifndef abs +#define abs(a) (((a) > 0) ? (a): -(a)) +#endif + + + +#endif