1 /* 2 * %CopyrightBegin% 3 * 4 * Copyright Ericsson AB 2009-2016. All Rights Reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * %CopyrightEnd% 19 */ 20 21 #ifndef ERL_ERRNO_H__ 22 #define ERL_ERRNO_H__ 23 24 #include <errno.h> 25 /* 26 * Make sure that ENOTSUP is defined. 27 */ 28 #ifndef ENOTSUP 29 # ifdef EOPNOTSUPP 30 # define ENOTSUP EOPNOTSUPP 31 #else 32 # define ENOTSUP INT_MAX 33 # endif 34 #endif 35 36 #ifdef __WIN32__ 37 # ifndef EWOULDBLOCK 38 # define EWOULDBLOCK (10035) /* WSAEWOULDBLOCK */ 39 # endif 40 # ifndef ETIMEDOUT 41 # define ETIMEDOUT (10060) /* WSAETIMEDOUT */ 42 # endif 43 #else 44 # ifndef EWOULDBLOCK 45 # define EWOULDBLOCK EAGAIN 46 # endif 47 # ifndef ETIMEDOUT 48 # define ETIMEDOUT EAGAIN 49 # endif 50 #endif 51 52 #endif 53