Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: LGPL-2.0+ */ |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2008 Extreme Engineering Solutions, Inc. |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __MINGW_SUPPORT_H_ |
| 7 | #define __WINGW_SUPPORT_H_ 1 |
| 8 | |
| 9 | /* Defining __INSIDE_MSYS__ helps to prevent u-boot/mingw overlap */ |
| 10 | #define __INSIDE_MSYS__ 1 |
| 11 | |
| 12 | #include <windows.h> |
| 13 | |
| 14 | /* mmap protections */ |
| 15 | #define PROT_READ 0x1 /* Page can be read */ |
| 16 | #define PROT_WRITE 0x2 /* Page can be written */ |
| 17 | #define PROT_EXEC 0x4 /* Page can be executed */ |
| 18 | #define PROT_NONE 0x0 /* Page can not be accessed */ |
| 19 | |
| 20 | /* Sharing types (must choose one and only one of these) */ |
| 21 | #define MAP_SHARED 0x01 /* Share changes */ |
| 22 | #define MAP_PRIVATE 0x02 /* Changes are private */ |
| 23 | |
Mike Frysinger | 4f7136e | 2012-07-18 16:59:45 +0000 | [diff] [blame] | 24 | /* File perms */ |
| 25 | #ifndef S_IRGRP |
| 26 | # define S_IRGRP 0 |
| 27 | #endif |
| 28 | #ifndef S_IWGRP |
| 29 | # define S_IWGRP 0 |
| 30 | #endif |
| 31 | |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 32 | /* Windows 64-bit access macros */ |
| 33 | #define LODWORD(x) ((DWORD)((DWORDLONG)(x))) |
| 34 | #define HIDWORD(x) ((DWORD)(((DWORDLONG)(x) >> 32) & 0xffffffff)) |
| 35 | |
| 36 | typedef UINT uint; |
| 37 | typedef ULONG ulong; |
| 38 | |
| 39 | int fsync(int fd); |
| 40 | void *mmap(void *, size_t, int, int, int, int); |
| 41 | int munmap(void *, size_t); |
Remy Bohmer | faf36c1 | 2009-10-28 22:13:36 +0100 | [diff] [blame] | 42 | char *strtok_r(char *s, const char *delim, char **save_ptr); |
Mike Frysinger | 64b1502 | 2010-01-08 02:48:03 -0500 | [diff] [blame] | 43 | #include "getline.h" |
Peter Tyser | 2f8d396 | 2009-03-13 18:54:51 -0500 | [diff] [blame] | 44 | |
| 45 | #endif /* __MINGW_SUPPORT_H_ */ |