1 // Copyright 2014 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 // Older Mingw32 headers didn't define all error macros appropriately. 18 // Include this header to work-around this. 19 #include <errno.h> 20 21 #ifdef _WIN32 22 # include "aemu/base/sockets/Winsock.h" 23 24 # ifndef EINTR 25 # define EINTR 10004 26 # endif 27 # ifndef EAGAIN 28 # define EAGAIN 10035 29 # endif 30 # ifndef EWOULDBLOCK 31 # define EWOULDBLOCK EAGAIN 32 # endif 33 # ifndef EINPROGRESS 34 # define EINPROGRESS 10036 35 # endif 36 # ifndef EALREADY 37 # define EALREADY 10037 38 # endif 39 # ifndef EDESTADDRREQ 40 # define EDESTADDRREQ 10039 41 # endif 42 # ifndef EMSGSIZE 43 # define EMSGSIZE 10040 44 # endif 45 # ifndef EPROTOTYPE 46 # define EPROTOTYPE 10041 47 # endif 48 # ifndef ENOPROTOOPT 49 # define ENOPROTOOPT 10042 50 # endif 51 # ifndef EAFNOSUPPORT 52 # define EAFNOSUPPORT 10047 53 # endif 54 # ifndef EADDRINUSE 55 # define EADDRINUSE 10048 56 # endif 57 # ifndef EADDRNOTAVAIL 58 # define EADDRNOTAVAIL 10049 59 # endif 60 # ifndef ENETDOWN 61 # define ENETDOWN 10050 62 # endif 63 # ifndef ENETUNREACH 64 # define ENETUNREACH 10051 65 # endif 66 # ifndef ENETRESET 67 # define ENETRESET 10052 68 # endif 69 # ifndef ECONNABORTED 70 # define ECONNABORTED 10053 71 # endif 72 # ifndef ECONNRESET 73 # define ECONNRESET 10054 74 # endif 75 # ifndef ENOBUFS 76 # define ENOBUFS 10055 77 # endif 78 # ifndef EISCONN 79 # define EISCONN 10056 80 # endif 81 # ifndef ENOTCONN 82 # define ENOTCONN 10057 83 # endif 84 # ifndef ESHUTDOWN 85 # define ESHUTDOWN 10058 86 # endif 87 # ifndef ETOOMANYREFS 88 # define ETOOMANYREFS 10059 89 # endif 90 # ifndef ETIMEDOUT 91 # define ETIMEDOUT 10060 92 # endif 93 # ifndef ECONNREFUSED 94 # define ECONNREFUSED 10061 95 # endif 96 # ifndef ELOOP 97 # define ELOOP 10062 98 # endif 99 # ifndef EHOSTDOWN 100 # define EHOSTDOWN 10064 101 # endif 102 # ifndef EHOSTUNREACH 103 # define EHOSTUNREACH 10065 104 # endif 105 #endif /* _WIN32 */ 106