MiniDLNA update: 1.0.19.1 to 1.0.20
[tomato.git] / release / src / router / ntfs-3g / include / ntfs-3g / types.h
bloba64f12faaea4dd15a40f0b8dcca3671a774fa475
1 /*
2 * types.h - Misc type definitions not related to on-disk structure.
3 * Originated from the Linux-NTFS project.
5 * Copyright (c) 2000-2004 Anton Altaparmakov
7 * This program/include file is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program/include file is distributed in the hope that it will be
13 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program (in the main directory of the NTFS-3G
19 * distribution in the file COPYING); if not, write to the Free Software
20 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef _NTFS_TYPES_H
24 #define _NTFS_TYPES_H
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
30 #if HAVE_STDINT_H || !HAVE_CONFIG_H
31 #include <stdint.h>
32 #endif
33 #ifdef HAVE_SYS_TYPES_H
34 #include <sys/types.h>
35 #endif
37 typedef uint8_t u8; /* Unsigned types of an exact size */
38 typedef uint16_t u16;
39 typedef uint32_t u32;
40 typedef uint64_t u64;
42 typedef int8_t s8; /* Signed types of an exact size */
43 typedef int16_t s16;
44 typedef int32_t s32;
45 typedef int64_t s64;
47 typedef u16 le16;
48 typedef u32 le32;
49 typedef u64 le64;
52 * Declare sle{16,32,64} to be unsigned because we do not want sign extension
53 * on BE architectures.
55 typedef u16 sle16;
56 typedef u32 sle32;
57 typedef u64 sle64;
59 typedef u16 ntfschar; /* 2-byte Unicode character type. */
60 #define UCHAR_T_SIZE_BITS 1
63 * Clusters are signed 64-bit values on NTFS volumes. We define two types, LCN
64 * and VCN, to allow for type checking and better code readability.
66 typedef s64 VCN;
67 typedef sle64 leVCN;
68 typedef s64 LCN;
69 typedef sle64 leLCN;
72 * The NTFS journal $LogFile uses log sequence numbers which are signed 64-bit
73 * values. We define our own type LSN, to allow for type checking and better
74 * code readability.
76 typedef s64 LSN;
77 typedef sle64 leLSN;
80 * Cygwin has a collision between our BOOL and <windef.h>'s
81 * As long as this file will be included after <windows.h> were fine.
83 #ifndef _WINDEF_H
84 /**
85 * enum BOOL - These are just to make the code more readable...
87 typedef enum {
88 #ifndef FALSE
89 FALSE = 0,
90 #endif
91 #ifndef NO
92 NO = 0,
93 #endif
94 #ifndef ZERO
95 ZERO = 0,
96 #endif
97 #ifndef TRUE
98 TRUE = 1,
99 #endif
100 #ifndef YES
101 YES = 1,
102 #endif
103 #ifndef ONE
104 ONE = 1,
105 #endif
106 } BOOL;
107 #endif /* defined _WINDEF_H */
110 * enum IGNORE_CASE_BOOL -
112 typedef enum {
113 CASE_SENSITIVE = 0,
114 IGNORE_CASE = 1,
115 } IGNORE_CASE_BOOL;
117 #define STATUS_OK (0)
118 #define STATUS_ERROR (-1)
119 #define STATUS_RESIDENT_ATTRIBUTE_FILLED_MFT (-2)
120 #define STATUS_KEEP_SEARCHING (-3)
121 #define STATUS_NOT_FOUND (-4)
124 * Force alignment in a struct if required by processor
126 union ALIGNMENT {
127 u64 u64align;
128 void *ptralign;
131 #endif /* defined _NTFS_TYPES_H */