Whamcloud - gitweb
fixup last commit
authorjacob <jacob>
Tue, 9 Mar 2004 01:08:30 +0000 (01:08 +0000)
committerjacob <jacob>
Tue, 9 Mar 2004 01:08:30 +0000 (01:08 +0000)
lnet/include/lnet/types.h
lustre/portals/include/portals/types.h

index ccce5d5..d4ca453 100644 (file)
@@ -1,20 +1,27 @@
 #ifndef _P30_TYPES_H_
 #define _P30_TYPES_H_
 
-#ifdef __KERNEL__
-# include <linux/time.h>
+#ifdef __linux__
 # include <asm/types.h>
-# include <asm/timex.h>
-#else /* !__KERNEL__ */
+# if defined(__powerpc__) && !defined(__KERNEL__)
+#  define __KERNEL__
+#  include <asm/timex.h>
+#  undef __KERNEL__
+# else
+#  include <asm/timex.h>
+# endif
+#else
 # include <sys/types.h>
-# include <sys/time.h>
 typedef u_int32_t __u32;
 typedef u_int64_t __u64;
-# define do_gettimeofday(tv) gettimeofday(tv, NULL)
-# ifndef cycles_t
-typedef unsigned long cycles_t;
-# endif
-#endif /* !__KERNEL__ */
+#endif
+
+#ifdef __KERNEL__
+# include <linux/time.h>
+#else
+# include <sys/time.h>
+# define do_gettimeofday(tv) gettimeofday(tv, NULL);
+#endif
 
 #include <portals/errno.h>
 
index ccce5d5..d4ca453 100644 (file)
@@ -1,20 +1,27 @@
 #ifndef _P30_TYPES_H_
 #define _P30_TYPES_H_
 
-#ifdef __KERNEL__
-# include <linux/time.h>
+#ifdef __linux__
 # include <asm/types.h>
-# include <asm/timex.h>
-#else /* !__KERNEL__ */
+# if defined(__powerpc__) && !defined(__KERNEL__)
+#  define __KERNEL__
+#  include <asm/timex.h>
+#  undef __KERNEL__
+# else
+#  include <asm/timex.h>
+# endif
+#else
 # include <sys/types.h>
-# include <sys/time.h>
 typedef u_int32_t __u32;
 typedef u_int64_t __u64;
-# define do_gettimeofday(tv) gettimeofday(tv, NULL)
-# ifndef cycles_t
-typedef unsigned long cycles_t;
-# endif
-#endif /* !__KERNEL__ */
+#endif
+
+#ifdef __KERNEL__
+# include <linux/time.h>
+#else
+# include <sys/time.h>
+# define do_gettimeofday(tv) gettimeofday(tv, NULL);
+#endif
 
 #include <portals/errno.h>