2 * YAFFS: Yet another FFS. A NAND-flash specific file system.
3 * ywinceenv.h: Port of functions to WinCE
5 * Copyright (C) 2002 Aleph One Ltd.
6 * for Toby Churchill Ltd and Brightstar Engineering
8 * Created by Charles Manning <charles@aleph1.co.uk>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License version 2.1 as
12 * published by the Free Software Foundation.
15 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
17 * $Id: ywinceenv.h,v 1.3 2004-10-10 18:03:35 charles Exp $
21 #ifndef __YWINCEENV_H__
22 #define __YWINCEENV_H__
29 #include "devextras.h"
31 #define CONFIG_YAFFS_CASE_INSENSITIVE
33 #define YMALLOC(x) malloc(x)
34 #define YFREE(x) free(x)
37 #define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s))
38 #define YALERT(s) YINFO(s)
42 #define YAFFS_LOSTNFOUND_NAME "Lost Clusters"
43 #define YAFFS_LOSTNFOUND_PREFIX "OBJ"
45 #define YPRINTF(x) RETAILMSG(1,x)
47 // Always pass the sum compare to overcome the case insensitivity issue
48 #define yaffs_SumCompare(x,y) ((x) == (y))
49 #define yaffs_strcmp(a,b) _stricmp(a,b)
52 #define u_char unsigned char
61 extern unsigned yfsd_U32FileTimeNow(void);
63 #define Y_CURRENT_TIME yfsd_U32FileTimeNow()
64 #define Y_TIME_CONVERT(x) (x)
66 #define YAFFS_ROOT_MODE FILE_ATTRIBUTE_ARCHIVE
67 #define YAFFS_LOSTNFOUND_MODE FILE_ATTRIBUTE_HIDDEN
70 #define TENDSTR L"\r\n"
71 #define TSTR(x) TEXT(x)
72 #define TOUT(x) RETAILMSG(1, x)
74 #define YBUG() T(YAFFS_TRACE_BUG,(TSTR("==>> yaffs bug: %s %d" TENDSTR),TEXT(__FILE__),__LINE__))