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.1 2004-09-19 09:21:38 charles Exp $
21 #ifndef __YWINCEENV_H__
22 #define __YWINCEENV_H__
29 #define CONFIG_YAFFS_CASE_INSENSITIVE
31 #define YMALLOC(x) malloc(x)
32 #define YFREE(x) free(x)
35 #define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s))
36 #define YALERT(s) YINFO(s)
40 #define YAFFS_LOSTNFOUND_NAME "Lost Clusters"
41 #define YAFFS_LOSTNFOUND_PREFIX "OBJ"
43 #define YPRINTF(x) RETAILMSG(1,x)
45 // Always pass the sum compare to overcome the case insensitivity issue
46 #define yaffs_SumCompare(x,y) ((x) == (y))
47 #define yaffs_strcmp(a,b) _stricmp(a,b)
50 #define u_char unsigned char
59 extern unsigned yfsd_U32FileTimeNow(void);
61 #define CURRENT_TIME yfsd_U32FileTimeNow()
62 #define YAFFS_ROOT_MODE FILE_ATTRIBUTE_ARCHIVE
63 #define YAFFS_LOSTNFOUND_MODE FILE_ATTRIBUTE_HIDDEN
66 #define TENDSTR L"\r\n"
67 #define TSTR(x) TEXT(x)
68 #define TOUT(x) RETAILMSG(1, x)
70 #define YBUG() T(YAFFS_TRACE_BUG,(TSTR("==>> yaffs bug: %s %d" TENDSTR),TEXT(__FILE__),__LINE__))