Add missing definition for yaffs_strcmp
[yaffs2.git] / yportenv_single.h
1 /*
2  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
3  *
4  * Copyright (C) 2002-2011 Aleph One Ltd.
5  *   for Toby Churchill Ltd and Brightstar Engineering
6  *
7  * Created by Charles Manning <charles@aleph1.co.uk>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser General Public License version 2.1 as
11  * published by the Free Software Foundation.
12  *
13  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
14  */
15
16 #ifndef __YPORTENV_LINUX_H__
17 #define __YPORTENV_LINUX_H__
18
19 #include <linux/version.h>
20 #include <linux/kernel.h>
21 #include <linux/mm.h>
22 #include <linux/sched.h>
23 #include <linux/string.h>
24 #include <linux/slab.h>
25 #include <linux/vmalloc.h>
26 #include <linux/xattr.h>
27 #include <linux/list.h>
28 #include <linux/types.h>
29 #include <linux/fs.h>
30 #include <linux/stat.h>
31 #include <linux/sort.h>
32 #include <linux/bitops.h>
33
34 /*  These type wrappings are used to support Unicode names in WinCE. */
35 #define YCHAR char
36 #define YUCHAR unsigned char
37 #define _Y(x)     x
38 #define yaffs_strcat(a, b)     strcat(a, b)
39 #define yaffs_strcpy(a, b)     strcpy(a, b)
40 #define yaffs_strncpy(a, b, c) strncpy(a, b, c)
41 #define yaffs_strncmp(a, b, c) strncmp(a, b, c)
42 #define yaffs_strnlen(s,m)      strnlen(s,m)
43
44 #define YAFFS_LOSTNFOUND_NAME           "lost+found"
45 #define YAFFS_LOSTNFOUND_PREFIX         "obj"
46
47
48 #define YAFFS_ROOT_MODE                 0755
49 #define YAFFS_LOSTNFOUND_MODE           0700
50
51 #define Y_CURRENT_TIME CURRENT_TIME.tv_sec
52 #define Y_TIME_CONVERT(x) (x).tv_sec
53
54 #define compile_time_assertion(assertion) \
55         ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
56
57 #ifdef CONFIG_YAFFS_DEBUG
58 #define yaffs_trace(msk, fmt, ...) do { \
59         if (yaffs_trace_mask & (msk)) \
60                 printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
61 } while (0)
62 #else
63 #define yaffs_trace(msk, fmt, ...) do { \
64 } while (0)
65 #endif
66
67 #endif