Add support for MacOS and old compilers (not supporting C++11). Main patch is from Samuel Marks.

This commit is contained in:
2022-11-21 17:56:29 +01:00
parent 6e3958f09e
commit 7878f91cdd
5 changed files with 77 additions and 8 deletions

View File

@@ -131,7 +131,17 @@ namespace gourou
DRM_INVALID_KEY_SIZE,
DRM_ERR_ENCRYPTION_KEY_FP
};
#ifndef _NOEXCEPT
#if __STDC_VERSION__ >= 201112L
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
#else
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
#endif
#endif /* !_NOEXCEPT */
/**
* Generic exception class
*/
@@ -157,7 +167,7 @@ namespace gourou
this->fullmessage = strdup(other.fullmessage);
}
~Exception()
~Exception() _NOEXCEPT
{
free(fullmessage);
}