Remove 7z archive with test images
[lwext4.git] / prefix_patch / ext4_oflags.patch
1 diff --git a/include/ext4_oflags.h b/include/ext4_oflags.h
2 index 7f7be7e..87f42ef 100644
3 --- a/include/ext4_oflags.h
4 +++ b/include/ext4_oflags.h
5 @@ -45,51 +45,33 @@ extern "C" {
6  
7  #if CONFIG_HAVE_OWN_OFLAGS
8  
9 - #ifndef O_RDONLY
10 - #define O_RDONLY 00
11 - #endif
12 -
13 - #ifndef O_WRONLY
14 - #define O_WRONLY 01
15 - #endif
16 -
17 - #ifndef O_RDWR
18 - #define O_RDWR 02
19 - #endif
20 -
21 - #ifndef O_CREAT
22 - #define O_CREAT 0100
23 - #endif
24 -
25 - #ifndef O_EXCL
26 - #define O_EXCL 0200
27 - #endif
28 -
29 - #ifndef O_TRUNC
30 - #define O_TRUNC 01000
31 - #endif
32 -
33 - #ifndef O_APPEND
34 - #define O_APPEND 02000
35 - #endif
36 + #define LWEXT4_FLAGS(flags) LWEXT4_##flags
37 +
38 + enum ext4_oflags {
39 +       LWEXT4_FLAGS(O_RDONLY) = 00,
40 +       LWEXT4_FLAGS(O_WRONLY) = 01,
41 +       LWEXT4_FLAGS(O_RDWR) = 02,
42 +       LWEXT4_FLAGS(O_CREAT) = 0100,
43 +       LWEXT4_FLAGS(O_EXCL) = 0200,
44 +       LWEXT4_FLAGS(O_TRUNC) = 01000,
45 +       LWEXT4_FLAGS(O_APPEND) = 02000
46 + };
47  
48  /********************************FILE SEEK FLAGS*****************************/
49  
50 - #ifndef SEEK_SET
51 - #define SEEK_SET 0
52 - #endif
53 -
54 - #ifndef SEEK_CUR
55 - #define SEEK_CUR 1
56 - #endif
57 -
58 - #ifndef SEEK_END
59 - #define SEEK_END 2
60 - #endif
61 + enum ext4_seek_flags {
62 +       LWEXT4_FLAGS(SEEK_SET) = 0,
63 +       LWEXT4_FLAGS(SEEK_CUR) = 1,
64 +       LWEXT4_FLAGS(SEEK_END) = 2
65 + };
66  
67  #else
68 +
69   #include <unistd.h>
70   #include <fcntl.h>
71 +
72 + #define LWEXT4_FLAGS(flags) (flags)
73 +
74  #endif
75  
76  #ifdef __cplusplus
77 @@ -101,3 +83,4 @@ extern "C" {
78  /**
79   * @}
80   */
81 +