This file is indexed.

/usr/include/winpr2/winpr/wtypes.h is in libwinpr2-dev 2.0.0~git20170725.1.1648deb+dfsg1-7ubuntu0.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
/**
 * WinPR: Windows Portable Runtime
 * Windows Data Types
 *
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef WINPR_WTYPES_H
#define WINPR_WTYPES_H

/* Set by CMake during configuration */
#define WINPR_HAVE_STDINT_H
#define WINPR_HAVE_STDBOOL_H

#if !defined(_MSC_VER) || _MSC_VER >= 1900
/* Microsoft's inttypes.h is broken before MSVC 2015 */
#define WINPR_HAVE_INTTYPES_H
#endif

/* MSDN: Windows Data Types - http://msdn.microsoft.com/en-us/library/aa383751/ */
/* [MS-DTYP]: Windows Data Types - http://msdn.microsoft.com/en-us/library/cc230273/ */

#include <wchar.h>
#include <winpr/windows.h>

#include <winpr/spec.h>

#ifdef WINPR_HAVE_STDBOOL_H
#include <stdbool.h>
#endif

#ifdef WINPR_HAVE_STDINT_H
#include <stdint.h>
#endif

#ifdef WINPR_HAVE_INTTYPES_H
#include <inttypes.h>
#endif

#include <limits.h>

#ifdef _WIN32
#include <wtypes.h>
#endif

#if defined(__OBJC__) && defined(__APPLE__)
#include <objc/objc.h>
#endif

#ifndef CONST
#define CONST const
#endif

#ifndef VOID
#define VOID void
#endif

#ifndef _WIN32

#define CALLBACK

#define WINAPI
#define CDECL

#ifndef FAR
#define FAR
#endif

#ifndef NEAR
#define NEAR
#endif

#ifdef WINPR_HAVE_STDINT_H
typedef int8_t                  __int8;
typedef uint8_t                 __uint8;
typedef int16_t                 __int16;
typedef uint16_t                __uint16;
typedef int32_t                 __int32;
typedef uint32_t                __uint32;
typedef int64_t                 __int64;
typedef uint64_t                __uint64;
#else
#if UCHAR_MAX == 0xFF
typedef signed char             __int8;
typedef unsigned char           __uint8;
#else
#error "8-bit type not configured"
#endif
#if USHRT_MAX == 0xFFFF
typedef short                   __int16;
typedef unsigned short          __uint16;
#elif UINT_MAX == 0xFFFF
typedef int                     __int16;
typedef unsigned int            __uint16;
#error "16-bit type not configured"
#endif
#if UINT_MAX == 0xFFFFFFFF
typedef int                     __int32;
typedef unsigned int            __uint32;
#elif ULONG_MAX == 0xFFFFFFFF
typedef long                    __int32;
typedef unsigned long           __uint32;
#else
#error "32-bit type not configured"
#endif
 #if ULONG_MAX == 0xFFFFFFFFFFFFFFFF
typedef long                    __int64;
typedef unsigned long           __uint64;
#elif ULLONG_MAX == 0xFFFFFFFFFFFFFFFF
typedef long long               __int64;
typedef unsigned long long      __uint64;
#else
#error "64-bit type not configured"
#endif
#endif /* WINPR_HAVE_STDINT_H */

#ifdef WINPR_HAVE_STDINT_H
#if defined(__ILP64__) || defined(__LP64__)
#define __int3264 int64_t
#define __uint3264 uint64_t
#else
#define __int3264 int32_t
#define __uint3264 uint32_t
#endif
#else
#if defined(__ILP64__) || defined(__LP64__)
#define __int3264 __int64
#define __uint3264 __uint64
#else
#define __int3264 __int32
#define __uint3264 __uint32
#endif
#endif /* WINPR_HAVE_STDINT_H */


typedef void *PVOID, *LPVOID, *PVOID64, *LPVOID64;

#ifndef XMD_H /* X11/Xmd.h typedef collision with BOOL */
#ifndef __OBJC__ /* objc.h typedef collision with BOOL */
#ifndef __APPLE__
typedef __int32 BOOL;
#else /* __APPLE__ */
/* ensure compatibility with objc libraries */
#if (TARGET_OS_IPHONE && __LP64__)  ||  TARGET_OS_WATCH
typedef bool BOOL;
#else
typedef signed char BOOL;
#endif
#endif /* __APPLE__ */
#endif /* __OBJC__ */
#endif /* XMD_H */

typedef BOOL *PBOOL, *LPBOOL;

#ifndef FALSE
#define FALSE 0
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef XMD_H /* X11/Xmd.h typedef collision with BYTE */
typedef __uint8 BYTE;
#endif /* XMD_H */
typedef BYTE byte, *PBYTE, *LPBYTE;
typedef BYTE BOOLEAN, PBOOLEAN;

#if CHAR_BIT == 8
typedef char CHAR;
typedef unsigned char UCHAR;
#else
typedef __int8 CHAR;
typedef __uint8 UCHAR;
#endif
typedef CHAR CCHAR, *PCHAR, *LPCH, *PCH, *PSTR, *LPSTR;
typedef const CHAR *LPCCH, *PCCH, *LPCSTR, *PCSTR;
typedef UCHAR *PUCHAR;

typedef __uint16 WCHAR;
typedef WCHAR UNICODE, *PWCHAR, *LPWCH, *PWCH, *BSTR, *LMSTR, *LPWSTR, *PWSTR;
typedef const WCHAR *LPCWCH, *PCWCH, *LMCSTR, *LPCWSTR, *PCWSTR;

typedef __int16 SHORT, *PSHORT;
typedef __int32 INT, *PINT, *LPINT;
typedef __int32 LONG, *PLONG, *LPLONG;
typedef __int64 LONGLONG, *PLONGLONG;

typedef __uint32 UINT, *PUINT, *LPUINT;
typedef __uint16 USHORT, *PUSHORT;
typedef __uint32 ULONG, *PULONG;
typedef __uint64 ULONGLONG, *PULONGLONG;

#ifndef XMD_H /* X11/Xmd.h typedef collisions */
typedef __int8 INT8;
typedef __int16 INT16;
typedef __int32 INT32;
typedef __int64 INT64;
#endif
typedef INT8 *PINT8;
typedef INT16 *PINT16;
typedef INT32 *PINT32;
typedef INT64 *PINT64;

typedef __int32 LONG32, *PLONG32;
#ifndef LONG64 /* X11/Xmd.h uses/defines LONG64 */
typedef __int64 LONG64, *PLONG64;
#endif

typedef __uint8 UINT8, *PUINT8;
typedef __uint16 UINT16, *PUINT16;
typedef __uint32 UINT32, *PUINT32;
typedef __uint64 UINT64, *PUINT64;
typedef __uint64 ULONG64, *PULONG64;

typedef __uint16 WORD, *PWORD, *LPWORD;
typedef __uint32 DWORD, DWORD32, *PDWORD, *LPDWORD, *PDWORD32;
typedef __uint64 DWORD64, DWORDLONG, QWORD, *PDWORD64, *PDWORDLONG, *PQWORD;

typedef __int3264 INT_PTR, *PINT_PTR;
typedef __uint3264 UINT_PTR, *PUINT_PTR;
typedef __int3264 LONG_PTR, *PLONG_PTR;
typedef __uint3264 ULONG_PTR, *PULONG_PTR;
typedef __uint3264 DWORD_PTR, *PDWORD_PTR;

typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;

typedef float FLOAT;

typedef double DOUBLE;

typedef void* HANDLE, *PHANDLE, *LPHANDLE;
typedef HANDLE HINSTANCE;
typedef HANDLE HMODULE;
typedef HANDLE HWND;
typedef HANDLE HBITMAP;
typedef HANDLE HICON;
typedef HANDLE HCURSOR;
typedef HANDLE HBRUSH;
typedef HANDLE HMENU;

typedef DWORD HCALL;

typedef ULONG error_status_t;
typedef LONG HRESULT;
typedef LONG SCODE;
typedef SCODE *PSCODE;

typedef struct _GUID
{
	UINT32 Data1;
	UINT16 Data2;
	UINT16 Data3;
	BYTE Data4[8];
} GUID, UUID, *PGUID, *LPGUID, *LPCGUID;

typedef struct _LUID
{
	DWORD LowPart;
	LONG  HighPart;
} LUID, *PLUID;

typedef GUID IID;
typedef IID* REFIID;

#ifdef UNICODE
#define _T(x)	L ## x
#else
#define _T(x)	x
#endif

#ifdef UNICODE
typedef LPWSTR PTSTR;
typedef LPWSTR LPTCH;
typedef LPWSTR LPTSTR;
typedef LPCWSTR LPCTSTR;
#else
typedef LPSTR PTSTR;
typedef LPSTR LPTCH;
typedef LPSTR LPTSTR;
typedef LPCSTR LPCTSTR;
#endif

typedef union _ULARGE_INTEGER
{
	struct
	{
		DWORD LowPart;
		DWORD HighPart;
	};

	struct
	{
		DWORD LowPart;
		DWORD HighPart;
	} u;

	ULONGLONG QuadPart;
} ULARGE_INTEGER, *PULARGE_INTEGER;

typedef union _LARGE_INTEGER
{
	struct
	{
		DWORD LowPart;
		LONG  HighPart;
	};

	struct
	{
		DWORD LowPart;
		LONG  HighPart;
	} u;

	LONGLONG QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;

typedef struct _FILETIME
{
	DWORD dwLowDateTime;
	DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;

typedef struct _SYSTEMTIME
{
	WORD wYear;
	WORD wMonth;
	WORD wDayOfWeek;
	WORD wDay;
	WORD wHour;
	WORD wMinute;
	WORD wSecond;
	WORD wMilliseconds;
} SYSTEMTIME,*PSYSTEMTIME,*LPSYSTEMTIME;

typedef struct _RPC_SID_IDENTIFIER_AUTHORITY
{
	BYTE Value[6];
} RPC_SID_IDENTIFIER_AUTHORITY;

typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;

typedef struct _RPC_SID
{
	UCHAR Revision;
	UCHAR SubAuthorityCount;
	RPC_SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
	ULONG SubAuthority[];
} RPC_SID, *PRPC_SID, *PSID;

typedef struct _ACL
{
	UCHAR AclRevision;
	UCHAR Sbz1;
	USHORT AclSize;
	USHORT AceCount;
	USHORT Sbz2;
} ACL, *PACL;

typedef struct _SECURITY_DESCRIPTOR
{
	UCHAR Revision;
	UCHAR Sbz1;
	USHORT Control;
	PSID Owner;
	PSID Group;
	PACL Sacl;
	PACL Dacl;
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;

typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;

typedef struct _SECURITY_ATTRIBUTES
{
	DWORD nLength;
	LPVOID lpSecurityDescriptor;
	BOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;

typedef struct _PROCESS_INFORMATION
{
	HANDLE hProcess;
	HANDLE hThread;
	DWORD dwProcessId;
	DWORD dwThreadId;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;

typedef DWORD (*PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;

typedef void* FARPROC;

typedef struct tagDEC
{
	USHORT wReserved;
	union {
		struct {
			BYTE scale;
			BYTE sign;
		} DUMMYSTRUCTNAME;
		USHORT signscale;
	} DUMMYUNIONNAME;
	ULONG Hi32;
	union {
		struct {
			ULONG Lo32;
			ULONG Mid32;
		} DUMMYSTRUCTNAME2;
		ULONGLONG Lo64;
	} DUMMYUNIONNAME2;
} DECIMAL;

typedef DECIMAL *LPDECIMAL;

#define DECIMAL_NEG		((BYTE) 0x80)
#define DECIMAL_SETZERO(dec)	{ (dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0; }

typedef DWORD LCID;
typedef PDWORD PLCID;
typedef WORD LANGID;

#endif /* _WIN32 not defined */

typedef void* PCONTEXT_HANDLE;
typedef PCONTEXT_HANDLE* PPCONTEXT_HANDLE;

#ifndef _NTDEF
typedef LONG NTSTATUS;
typedef NTSTATUS *PNTSTATUS;
#endif

#ifndef _LPCVOID_DEFINED
#define _LPCVOID_DEFINED
typedef const VOID *LPCVOID;
#endif

#ifndef _LPCBYTE_DEFINED
#define _LPCBYTE_DEFINED
typedef const BYTE *LPCBYTE;
#endif

/* integer format specifiers */
#ifndef WINPR_HAVE_INTTYPES_H
#define PRId8           "hhd"
#define PRIi8           "hhi"
#define PRIu8           "hhu"
#define PRIo8           "hho"
#define PRIx8           "hhx"
#define PRIX8           "hhX"
#define PRId16          "hd"
#define PRIi16          "hi"
#define PRIu16          "hu"
#define PRIo16          "ho"
#define PRIx16          "hx"
#define PRIX16          "hX"
#if defined(_MSC_VER)
#define PRId32          "I32d"
#define PRIi32          "I32i"
#define PRIu32          "I32u"
#define PRIo32          "I32o"
#define PRIx32          "I32x"
#define PRIX32          "I32X"
#define PRId64          "I64d"
#define PRIi64          "I64i"
#define PRIu64          "I64u"
#define PRIo64          "I64o"
#define PRIx64          "I64x"
#define PRIX64          "I64X"
#else
#define PRId32          "d"
#define PRIi32          "i"
#define PRIu32          "u"
#define PRIo32          "o"
#define PRIx32          "x"
#define PRIX32          "X"
#if ULONG_MAX == 0xFFFFFFFFFFFFFFFF
#define PRId64          "ld"
#define PRIi64          "li"
#define PRIu64          "lu"
#define PRIo64          "lo"
#define PRIx64          "lx"
#define PRIX64          "lX"
#else
#define PRId64          "lld"
#define PRIi64          "lli"
#define PRIu64          "llu"
#define PRIo64          "llo"
#define PRIx64          "llx"
#define PRIX64          "llX"
#endif
#endif /* _MSC_VER */
#endif /* WINPR_HAVE_INTTYPES_H not defined*/


#if defined(_MSC_VER) && _MSC_VER < 1900
/* %z not supported before MSVC 2015 */
#define PRIdz		"Id"
#define PRIiz		"Ii"
#define PRIuz		"Iu"
#define PRIoz		"Io"
#define PRIxz		"Ix"
#define PRIXz		"IX"
#else
#define PRIdz		"zd"
#define PRIiz		"zi"
#define PRIuz		"zu"
#define PRIoz		"zo"
#define PRIxz		"zx"
#define PRIXz		"zX"
#endif


#include <winpr/user.h>

#endif /* WINPR_WTYPES_H */