]> git.proxmox.com Git - libgit2.git/blob - src/win32/reparse.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / src / win32 / reparse.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7
8 #ifndef INCLUDE_win32_reparse_h__
9 #define INCLUDE_win32_reparse_h__
10
11 /* This structure is defined on MSDN at
12 * http://msdn.microsoft.com/en-us/library/windows/hardware/ff552012(v=vs.85).aspx
13 *
14 * It was formerly included in the Windows 2000 SDK and remains defined in
15 * MinGW, so we must define it with a silly name to avoid conflicting.
16 */
17 typedef struct _GIT_REPARSE_DATA_BUFFER {
18 ULONG ReparseTag;
19 USHORT ReparseDataLength;
20 USHORT Reserved;
21 union {
22 struct {
23 USHORT SubstituteNameOffset;
24 USHORT SubstituteNameLength;
25 USHORT PrintNameOffset;
26 USHORT PrintNameLength;
27 ULONG Flags;
28 WCHAR PathBuffer[1];
29 } SymbolicLink;
30 struct {
31 USHORT SubstituteNameOffset;
32 USHORT SubstituteNameLength;
33 USHORT PrintNameOffset;
34 USHORT PrintNameLength;
35 WCHAR PathBuffer[1];
36 } MountPoint;
37 struct {
38 UCHAR DataBuffer[1];
39 } Generic;
40 } ReparseBuffer;
41 } GIT_REPARSE_DATA_BUFFER;
42
43 #define REPARSE_DATA_HEADER_SIZE 8
44 #define REPARSE_DATA_MOUNTPOINT_HEADER_SIZE 8
45 #define REPARSE_DATA_UNION_SIZE 12
46
47 /* Missing in MinGW */
48 #ifndef FSCTL_GET_REPARSE_POINT
49 # define FSCTL_GET_REPARSE_POINT 0x000900a8
50 #endif
51
52 /* Missing in MinGW */
53 #ifndef FSCTL_SET_REPARSE_POINT
54 # define FSCTL_SET_REPARSE_POINT 0x000900a4
55 #endif
56
57 #endif