Widen page count field in blockinfo to allow lots of pages per block
[yaffs/.git] / devextras.h
index a28135f65269920944a8cf01b01b2b7a7b25c74a..3150f96206f70a59765e47bb35ec5e31ce8e0f30 100644 (file)
@@ -8,19 +8,28 @@
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
  * published by the Free Software Foundation.
  *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ *
  * This file is just holds extra declarations used during development.
  * Most of these are from kernel includes placed here so we can use them in 
  * applications.
  *
+ * $Id: devextras.h,v 1.5 2002-09-27 20:50:50 charles Exp $
+ *
  */
  
 #ifndef __EXTRAS_H__
 #define __EXTRAS_H__
 
-#ifndef __KERNEL__
+#if defined WIN32
+#define __inline__ __inline
+#define new newHack
+#endif
+
+#if !(defined __KERNEL__) || (defined WIN32)
 
 // User space defines
 
@@ -191,8 +200,6 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
 
 
 
-#define CURRENT_TIME 0
-
 
 /*
  * File types
@@ -207,7 +214,9 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
 #define DT_SOCK                12
 #define DT_WHT         14
 
+#ifndef WIN32
 #include <sys/stat.h>
+#endif
 
 /*
  * Attribute flags.  These should be or-ed together to figure out what
@@ -242,16 +251,21 @@ struct iattr {
 
 
 #else
+
+#ifndef WIN32
 #include <linux/types.h>
 #include <linux/list.h>
 #include <linux/fs.h>
 #include <linux/stat.h>
-
+#endif
 
 #endif
 
 
 
+#if defined WIN32
+#undef new
+#endif 
 
 #endif