Linux 2.2.0
[davej-history.git] / fs / ntfs / ntfstypes.h
blobe88a4169bde5e9cad52240acd98e2d7bec12fa16
1 /*
2 * types.h
3 * This file defines four things:
4 * - generic platform independent fixed-size types (e.g. ntfs_u32)
5 * - specific fixed-size types (e.g. ntfs_offset_t)
6 * - macros that read and write those types from and to byte arrays
7 * - types derived from OS specific ones
9 * Copyright (C) 1996,1998 Martin von Löwis
12 #ifdef NTFS_IN_LINUX_KERNEL
13 /* get installed types if we compile the kernel*/
14 #include <linux/fs.h>
15 #endif
17 /* We don't need to define __LITTLE_ENDIAN, as we use
18 <asm/byteorder>. */
20 #include "ntfsendian.h"
21 #include <asm/types.h>
23 /* integral types */
24 #ifndef NTFS_INTEGRAL_TYPES
25 #define NTFS_INTEGRAL_TYPES
26 typedef u8 ntfs_u8;
27 typedef u16 ntfs_u16;
28 typedef u32 ntfs_u32;
29 typedef u64 ntfs_u64;
30 typedef s8 ntfs_s8;
31 typedef s16 ntfs_s16;
32 typedef s32 ntfs_s32;
33 typedef s64 ntfs_s64;
34 #endif
36 /* unicode character type */
37 #ifndef NTFS_WCHAR_T
38 #define NTFS_WCHAR_T
39 typedef u16 ntfs_wchar_t;
40 #endif
41 /* file offset */
42 #ifndef NTFS_OFFSET_T
43 #define NTFS_OFFSET_T
44 typedef u64 ntfs_offset_t;
45 #endif
46 /* UTC */
47 #ifndef NTFS_TIME64_T
48 #define NTFS_TIME64_T
49 typedef u64 ntfs_time64_t;
50 #endif
51 /* This is really unsigned long long. So we support only volumes up to 2 TB */
52 #ifndef NTFS_CLUSTER_T
53 #define NTFS_CLUSTER_T
54 typedef u32 ntfs_cluster_t;
55 #endif
57 /* architecture independent macros */
59 /* PUTU32 would not clear all bytes */
60 #define NTFS_PUTINUM(p,i) NTFS_PUTU64(p,i->i_number);\
61 NTFS_PUTU16(((char*)p)+6,i->sequence_number)
63 /* system dependent types */
64 #include <asm/posix_types.h>
65 #ifndef NTMODE_T
66 #define NTMODE_T
67 typedef __kernel_mode_t ntmode_t;
68 #endif
69 #ifndef NTFS_UID_T
70 #define NTFS_UID_T
71 typedef __kernel_uid_t ntfs_uid_t;
72 #endif
73 #ifndef NTFS_GID_T
74 #define NTFS_GID_T
75 typedef __kernel_gid_t ntfs_gid_t;
76 #endif
77 #ifndef NTFS_SIZE_T
78 #define NTFS_SIZE_T
79 typedef __kernel_size_t ntfs_size_t;
80 #endif
81 #ifndef NTFS_TIME_T
82 #define NTFS_TIME_T
83 typedef __kernel_time_t ntfs_time_t;
84 #endif
87 * Local variables:
88 * c-file-style: "linux"
89 * End: