File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ when InJs:
26
26
)
27
27
else:
28
28
when defined(windows):
29
- import std/winlean
29
+ import ../util/mywinlean
30
30
type
31
31
LPVOID = pointer
32
32
LPDWORD = ptr DWORD
@@ -158,9 +158,6 @@ else:
158
158
result .add chr(0xFFFD shr 6 and ones(6) or 0b10_0000_00)
159
159
result .add chr(0xFFFD and ones(6) or 0b10_0000_00)
160
160
161
- const
162
- IO_REPARSE_TAG_SYMLINK = ULONG 0xA000000C
163
- IO_REPARSE_TAG_MOUNT_POINT = ULONG 0xA0000003
164
161
# _Py_MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
165
162
166
163
const REPARSE_BUFSIZE = 16 * 1024
Original file line number Diff line number Diff line change @@ -146,10 +146,13 @@ const
146
146
147
147
GENERIC_READ* = cast [DWORD](0x80000000)
148
148
149
- IO_REPARSE_TAG_SYMLINK* = 0xA000000C
149
+ IO_REPARSE_TAG_SYMLINK* = cast[DWORD]( 0xA000000C)
150
150
151
151
FILE_READ_ATTRIBUTES* = 128
152
152
153
+ FILE_ATTRIBUTE_REPARSE_POINT* = cast[DWORD](0x400)
154
+ IO_REPARSE_TAG_MOUNT_POINT* = cast[DWORD](0xA0000003)
155
+
153
156
let
154
157
INVALID_FILE_ATTRIBUTES*{.importc, header: "<WinNT.h>".}: DWORD
155
158
Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ definition are defined on these versions of macOS.]#
114
114
# const stat_filemode_doc = "Convert a file's mode to a string of the form '-rwxrwxrwx'"
115
115
116
116
when DW:
117
+ import ../ os_impl/ util/ mywinlean
118
+ template exp(name) =
119
+ const name* = int (mywinlean.name)
117
120
template impExp(name) =
118
121
let
119
122
`c name`{.importc: astToStr(name), header: WINNT_H.}: cint
@@ -138,6 +141,6 @@ when DW:
138
141
impExp(FILE_ATTRIBUTE_TEMPORARY)
139
142
impExp(FILE_ATTRIBUTE_VIRTUAL)
140
143
141
- impExp (IO_REPARSE_TAG_SYMLINK)
142
- impExp (IO_REPARSE_TAG_MOUNT_POINT)
144
+ exp (IO_REPARSE_TAG_SYMLINK)
145
+ exp (IO_REPARSE_TAG_MOUNT_POINT)
143
146
# impExp(IO_REPARSE_TAG_APPEXECLINK)
You can’t perform that action at this time.
0 commit comments