Skip to content

Commit 9a8d47b

Browse files
committed
Add pio headers to VS project, constexpr in pio
1 parent 4fff97a commit 9a8d47b

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

builds/win32/msvc15/engine_static.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@
323323
<ClInclude Include="..\..\..\src\jrd\ods.h" />
324324
<ClInclude Include="..\..\..\src\jrd\ods_proto.h" />
325325
<ClInclude Include="..\..\..\src\jrd\optimizer\Optimizer.h" />
326+
<ClInclude Include="..\..\..\src\jrd\os\pio.h" />
327+
<ClInclude Include="..\..\..\src\jrd\os\pio_proto.h" />
326328
<ClInclude Include="..\..\..\src\jrd\pag.h" />
327329
<ClInclude Include="..\..\..\src\jrd\PageToBufferMap.h" />
328330
<ClInclude Include="..\..\..\src\jrd\pag_proto.h" />

builds/win32/msvc15/engine_static.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,12 @@
11401140
<ClInclude Include="..\..\..\src\include\firebird\impl\blr.h">
11411141
<Filter>Header files</Filter>
11421142
</ClInclude>
1143+
<ClInclude Include="..\..\..\src\jrd\os\pio.h">
1144+
<Filter>Header files</Filter>
1145+
</ClInclude>
1146+
<ClInclude Include="..\..\..\src\jrd\os\pio_proto.h">
1147+
<Filter>Header files</Filter>
1148+
</ClInclude>
11431149
</ItemGroup>
11441150
<ItemGroup>
11451151
<None Include="..\..\..\src\dsql\DdlNodes.epp">

src/jrd/os/pio.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class jrd_file : public pool_alloc_rpt<SCHAR, type_fil>
5252

5353
#ifdef WIN_NT
5454
#ifdef SUPERSERVER_V2
55-
const int MAX_FILE_IO = 32; // Maximum "allocated" overlapped I/O events
55+
inline constexpr int MAX_FILE_IO = 32; // Maximum "allocated" overlapped I/O events
5656
#endif
5757

5858
class jrd_file : public pool_alloc_rpt<SCHAR, type_fil>
@@ -73,21 +73,21 @@ class jrd_file : public pool_alloc_rpt<SCHAR, type_fil>
7373
#endif
7474

7575

76-
const USHORT FIL_force_write = 1;
77-
const USHORT FIL_no_fs_cache = 2; // not using file system cache
78-
const USHORT FIL_readonly = 4; // file opened in readonly mode
79-
const USHORT FIL_sh_write = 8; // file opened in shared write mode
80-
const USHORT FIL_no_fast_extend = 16; // file not supports fast extending
81-
const USHORT FIL_raw_device = 32; // file is raw device
76+
inline constexpr USHORT FIL_force_write = 1;
77+
inline constexpr USHORT FIL_no_fs_cache = 2; // not using file system cache
78+
inline constexpr USHORT FIL_readonly = 4; // file opened in readonly mode
79+
inline constexpr USHORT FIL_sh_write = 8; // file opened in shared write mode
80+
inline constexpr USHORT FIL_no_fast_extend = 16; // file not supports fast extending
81+
inline constexpr USHORT FIL_raw_device = 32; // file is raw device
8282

8383
// Physical IO trace events
8484

85-
const SSHORT trace_create = 1;
86-
const SSHORT trace_open = 2;
87-
const SSHORT trace_page_size = 3;
88-
const SSHORT trace_read = 4;
89-
const SSHORT trace_write = 5;
90-
const SSHORT trace_close = 6;
85+
inline constexpr SSHORT trace_create = 1;
86+
inline constexpr SSHORT trace_open = 2;
87+
inline constexpr SSHORT trace_page_size = 3;
88+
inline constexpr SSHORT trace_read = 4;
89+
inline constexpr SSHORT trace_write = 5;
90+
inline constexpr SSHORT trace_close = 6;
9191

9292
// Physical I/O status block, used only in SS v2 for Win32
9393

@@ -104,9 +104,9 @@ struct phys_io_blk
104104
};
105105

106106
// piob_flags
107-
const UCHAR PIOB_error = 1; // I/O error occurred
108-
const UCHAR PIOB_success = 2; // I/O successfully completed
109-
const UCHAR PIOB_pending = 4; // Asynchronous I/O not yet completed
107+
inline constexpr UCHAR PIOB_error = 1; // I/O error occurred
108+
inline constexpr UCHAR PIOB_success = 2; // I/O successfully completed
109+
inline constexpr UCHAR PIOB_pending = 4; // Asynchronous I/O not yet completed
110110
#endif
111111

112112
} //namespace Jrd

0 commit comments

Comments
 (0)