mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:05:36 +01:00
Replace MBEDTLS_EINTR by IS_EINTR
check-names.sh reserves the prefix MBEDTLS_ for macros defined in config.h so this name (or check-names.sh) had to change. This is also more flexible because it allows for platforms that don't have an EINTR equivalent or have multiple such values.
This commit is contained in:
parent
c9f4d6d448
commit
ea7dbbe0de
@ -45,7 +45,7 @@
|
|||||||
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
|
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
|
||||||
!defined(EFI32)
|
!defined(EFI32)
|
||||||
|
|
||||||
#define MBEDTLS_EINTR WSAEINTR
|
#define IS_EINTR( ret ) ( ( ret ) == WSAEINTR )
|
||||||
|
|
||||||
#ifdef _WIN32_WINNT
|
#ifdef _WIN32_WINNT
|
||||||
#undef _WIN32_WINNT
|
#undef _WIN32_WINNT
|
||||||
@ -84,7 +84,7 @@ static int wsa_init_done = 0;
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define MBEDTLS_EINTR EINTR
|
#define IS_EINTR( ret ) ( ( ret ) == EINTR )
|
||||||
|
|
||||||
#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
|
#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
|
||||||
|
|
||||||
@ -479,7 +479,7 @@ int mbedtls_net_poll( mbedtls_net_context *ctx, uint32_t rw, uint32_t timeout )
|
|||||||
ret = select( fd + 1, &read_fds, &write_fds, NULL,
|
ret = select( fd + 1, &read_fds, &write_fds, NULL,
|
||||||
timeout == (uint32_t) -1 ? NULL : &tv );
|
timeout == (uint32_t) -1 ? NULL : &tv );
|
||||||
}
|
}
|
||||||
while( ret == MBEDTLS_EINTR );
|
while( IS_EINTR( ret ) );
|
||||||
|
|
||||||
if( ret < 0 )
|
if( ret < 0 )
|
||||||
return( MBEDTLS_ERR_NET_POLL_FAILED );
|
return( MBEDTLS_ERR_NET_POLL_FAILED );
|
||||||
|
Loading…
Reference in New Issue
Block a user