From 2f045db7dd2cd21b703213c21027355d9a0dea77 Mon Sep 17 00:00:00 2001 From: zab Date: Tue, 2 Mar 2004 23:12:37 +0000 Subject: [PATCH] - more progress in moving towards building against cray's external portals includes. This is a work in progress as I ran into internal compiler errors. All builds are probably broken. --- lnet/include/linux/libcfs.h | 2 +- lnet/include/linux/{list.h => lustre_list.h} | 21 +++++++++------------ lnet/include/lnet/build_check.h | 8 ++++++++ lustre/portals/include/linux/libcfs.h | 2 +- .../portals/include/linux/{list.h => lustre_list.h} | 21 +++++++++------------ lustre/portals/include/portals/build_check.h | 8 ++++++++ 6 files changed, 36 insertions(+), 26 deletions(-) rename lnet/include/linux/{list.h => lustre_list.h} (97%) create mode 100644 lnet/include/lnet/build_check.h rename lustre/portals/include/linux/{list.h => lustre_list.h} (97%) create mode 100644 lustre/portals/include/portals/build_check.h diff --git a/lnet/include/linux/libcfs.h b/lnet/include/linux/libcfs.h index 6a1f071..e4b414d 100644 --- a/lnet/include/linux/libcfs.h +++ b/lnet/include/linux/libcfs.h @@ -3,7 +3,7 @@ */ #ifndef _LIBCFS_H -#include +#include #define PORTAL_DEBUG diff --git a/lnet/include/linux/list.h b/lnet/include/linux/lustre_list.h similarity index 97% rename from lnet/include/linux/list.h rename to lnet/include/linux/lustre_list.h index 9cab047..a218f2c 100644 --- a/lnet/include/linux/list.h +++ b/lnet/include/linux/lustre_list.h @@ -1,4 +1,9 @@ -#ifndef _LINUX_LIST_H +#ifndef _LUSTRE_LIST_H +#define _LUSTRE_LIST_H + +#ifdef __KERNEL__ +#include +#else /* * Simple doubly linked list implementation. * @@ -100,9 +105,7 @@ static inline void list_del_init(struct list_head *entry) __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } -#endif -#ifndef list_for_each_entry /** * list_move - delete from one list and add as another's head * @list: the entry to move @@ -125,10 +128,7 @@ static inline void list_move_tail(struct list_head *list, __list_del(list->prev, list->next); list_add_tail(list, head); } -#endif -#ifndef _LINUX_LIST_H -#define _LINUX_LIST_H /** * list_empty - tests whether a list is empty * @head: the list to test. @@ -216,9 +216,6 @@ static inline void list_splice_init(struct list_head *list, for (pos = (head)->next, n = pos->next; pos != (head); \ pos = n, n = pos->next) -#endif - -#ifndef list_for_each_entry /** * list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop counter. @@ -231,9 +228,7 @@ static inline void list_splice_init(struct list_head *list, &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member), \ prefetch(pos->member.next)) -#endif -#ifndef list_for_each_entry_safe /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry * @pos: the type * to use as a loop counter. @@ -246,4 +241,6 @@ static inline void list_splice_init(struct list_head *list, n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) -#endif + +#endif /* if !__KERNEL__*/ +#endif /* if !_LUSTRE_LIST_H */ diff --git a/lnet/include/lnet/build_check.h b/lnet/include/lnet/build_check.h new file mode 100644 index 0000000..5db1352 --- /dev/null +++ b/lnet/include/lnet/build_check.h @@ -0,0 +1,8 @@ +#ifndef _BUILD_CHECK_H +#define _BUILD_CHECK_H + +#ifdef CRAY_PORTALS +#error "an application got to me instead of cray's includes" +#endif + +#endif diff --git a/lustre/portals/include/linux/libcfs.h b/lustre/portals/include/linux/libcfs.h index 6a1f071..e4b414d 100644 --- a/lustre/portals/include/linux/libcfs.h +++ b/lustre/portals/include/linux/libcfs.h @@ -3,7 +3,7 @@ */ #ifndef _LIBCFS_H -#include +#include #define PORTAL_DEBUG diff --git a/lustre/portals/include/linux/list.h b/lustre/portals/include/linux/lustre_list.h similarity index 97% rename from lustre/portals/include/linux/list.h rename to lustre/portals/include/linux/lustre_list.h index 9cab047..a218f2c 100644 --- a/lustre/portals/include/linux/list.h +++ b/lustre/portals/include/linux/lustre_list.h @@ -1,4 +1,9 @@ -#ifndef _LINUX_LIST_H +#ifndef _LUSTRE_LIST_H +#define _LUSTRE_LIST_H + +#ifdef __KERNEL__ +#include +#else /* * Simple doubly linked list implementation. * @@ -100,9 +105,7 @@ static inline void list_del_init(struct list_head *entry) __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } -#endif -#ifndef list_for_each_entry /** * list_move - delete from one list and add as another's head * @list: the entry to move @@ -125,10 +128,7 @@ static inline void list_move_tail(struct list_head *list, __list_del(list->prev, list->next); list_add_tail(list, head); } -#endif -#ifndef _LINUX_LIST_H -#define _LINUX_LIST_H /** * list_empty - tests whether a list is empty * @head: the list to test. @@ -216,9 +216,6 @@ static inline void list_splice_init(struct list_head *list, for (pos = (head)->next, n = pos->next; pos != (head); \ pos = n, n = pos->next) -#endif - -#ifndef list_for_each_entry /** * list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop counter. @@ -231,9 +228,7 @@ static inline void list_splice_init(struct list_head *list, &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member), \ prefetch(pos->member.next)) -#endif -#ifndef list_for_each_entry_safe /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry * @pos: the type * to use as a loop counter. @@ -246,4 +241,6 @@ static inline void list_splice_init(struct list_head *list, n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) -#endif + +#endif /* if !__KERNEL__*/ +#endif /* if !_LUSTRE_LIST_H */ diff --git a/lustre/portals/include/portals/build_check.h b/lustre/portals/include/portals/build_check.h new file mode 100644 index 0000000..5db1352 --- /dev/null +++ b/lustre/portals/include/portals/build_check.h @@ -0,0 +1,8 @@ +#ifndef _BUILD_CHECK_H +#define _BUILD_CHECK_H + +#ifdef CRAY_PORTALS +#error "an application got to me instead of cray's includes" +#endif + +#endif -- 1.8.3.1