Removed LWIP_SOCKET_SET_ERRNO - errno is always set - if it doesn't exist, it must be provided by the port

This commit is contained in:
goldsimon 2017-07-25 21:54:10 +02:00
parent a2e4dd2de7
commit 0ee6ad0a3a
3 changed files with 1 additions and 11 deletions

View File

@ -17,6 +17,7 @@ with newer versions.
* socket API: according to the standard, SO_ERROR now only returns asynchronous errors. * socket API: according to the standard, SO_ERROR now only returns asynchronous errors.
All other/normal/synchronous errors are (and always were) available via 'errno'. All other/normal/synchronous errors are (and always were) available via 'errno'.
LWIP_SOCKET_SET_ERRNO has been removed - 'errno' is always set - and required!
* compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix', * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix',
'src/include/compat/stdc' etc. 'src/include/compat/stdc' etc.

View File

@ -1849,13 +1849,6 @@
#define LWIP_SOCKET 1 #define LWIP_SOCKET 1
#endif #endif
/** LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete
* successfully, as required by POSIX. Default is POSIX-compliant.
*/
#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__
#define LWIP_SOCKET_SET_ERRNO 1
#endif
/** /**
* LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines.
* LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created.

View File

@ -90,13 +90,9 @@ struct lwip_sock {
#endif #endif
}; };
#if LWIP_SOCKET_SET_ERRNO
#ifndef set_errno #ifndef set_errno
#define set_errno(err) do { if (err) { errno = (err); } } while(0) #define set_errno(err) do { if (err) { errno = (err); } } while(0)
#endif #endif
#else /* LWIP_SOCKET_SET_ERRNO */
#define set_errno(err)
#endif /* LWIP_SOCKET_SET_ERRNO */
#if !LWIP_TCPIP_CORE_LOCKING #if !LWIP_TCPIP_CORE_LOCKING
/** Maximum optlen used by setsockopt/getsockopt */ /** Maximum optlen used by setsockopt/getsockopt */