mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:25:42 +01:00
Renamed error_strerror() to the less conflicting polarssl_strerror()
Ability to keep old function error_strerror() as well with POLARSSL_ERROR_STRERROR_BC. Also works with POLARSSL_ERROR_STRERROR_DUMMY.
This commit is contained in:
parent
89fe7f4388
commit
e2ab84f4a1
@ -19,6 +19,8 @@ Changes
|
||||
* Split up the GCM module into a starts/update/finish cycle
|
||||
* Client and server now filter sent and accepted ciphersuites on minimum
|
||||
and maximum protocol version
|
||||
* Renamed error_strerror() to the less conflicting polarssl_strerror()
|
||||
(Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC)
|
||||
|
||||
Bugfix
|
||||
* Fix for MPI assembly for ARM
|
||||
|
@ -325,6 +325,17 @@
|
||||
*/
|
||||
#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
|
||||
|
||||
/**
|
||||
* \def POLARSSL_ERROR_STRERROR_BC
|
||||
*
|
||||
* Make available the backward compatible error_strerror() next to the
|
||||
* current polarssl_strerror().
|
||||
*
|
||||
* Disable if you run into name conflicts and want to really remove the
|
||||
* error_strerror()
|
||||
*/
|
||||
#define POLARSSL_ERROR_STRERROR_BC
|
||||
|
||||
/**
|
||||
* \def POLARSSL_ERROR_STRERROR_DUMMY
|
||||
*
|
||||
|
@ -103,7 +103,11 @@ extern "C" {
|
||||
* \param buffer buffer to place representation in
|
||||
* \param buflen length of the buffer
|
||||
*/
|
||||
void polarssl_strerror( int errnum, char *buffer, size_t buflen );
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
void error_strerror( int errnum, char *buffer, size_t buflen );
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -156,7 +156,7 @@
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
void polarssl_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
size_t len;
|
||||
int use_ret;
|
||||
@ -613,6 +613,13 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
||||
snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
return polarssl_strerror( ret, buf, buflen );
|
||||
}
|
||||
#endif /* POLARSSL_ERROR_STRERROR_BC */
|
||||
|
||||
#else /* POLARSSL_ERROR_C */
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_DUMMY)
|
||||
@ -622,7 +629,7 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
||||
/*
|
||||
* Provide an non-function in case POLARSSL_ERROR_C is not defined
|
||||
*/
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
void polarssl_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
((void) ret);
|
||||
|
||||
@ -630,5 +637,12 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
return polarssl_strerror( ret, buf, buflen );
|
||||
}
|
||||
#endif /* POLARSSL_ERROR_STRERROR_BC */
|
||||
#endif /* POLARSSL_ERROR_STRERROR_DUMMY */
|
||||
|
||||
#endif /* POLARSSL_ERROR_C */
|
||||
|
@ -37,7 +37,7 @@ HEADER_INCLUDED
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
void polarssl_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
size_t len;
|
||||
int use_ret;
|
||||
@ -88,6 +88,13 @@ LOW_LEVEL_CODE_CHECKS
|
||||
snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
return polarssl_strerror( ret, buf, buflen );
|
||||
}
|
||||
#endif /* POLARSSL_ERROR_STRERROR_BC */
|
||||
|
||||
#else /* POLARSSL_ERROR_C */
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_DUMMY)
|
||||
@ -97,7 +104,7 @@ LOW_LEVEL_CODE_CHECKS
|
||||
/*
|
||||
* Provide an non-function in case POLARSSL_ERROR_C is not defined
|
||||
*/
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
void polarssl_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
((void) ret);
|
||||
|
||||
@ -105,5 +112,12 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
void error_strerror( int ret, char *buf, size_t buflen )
|
||||
{
|
||||
return polarssl_strerror( ret, buf, buflen );
|
||||
}
|
||||
#endif /* POLARSSL_ERROR_STRERROR_BC */
|
||||
#endif /* POLARSSL_ERROR_STRERROR_DUMMY */
|
||||
|
||||
#endif /* POLARSSL_ERROR_C */
|
||||
|
Loading…
Reference in New Issue
Block a user