mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
ircd: Fixes for macro collision (gnu++20).
This commit is contained in:
parent
3f4621461c
commit
211ea6ba55
3 changed files with 14 additions and 4 deletions
|
@ -24,8 +24,10 @@ namespace ircd::rfc1035
|
||||||
enum class op :uint8_t;
|
enum class op :uint8_t;
|
||||||
|
|
||||||
// Section 2.3.4 Size Limits
|
// Section 2.3.4 Size Limits
|
||||||
constexpr size_t LABEL_MAX {63};
|
#ifndef NAME_MAX
|
||||||
constexpr size_t NAME_MAX {255};
|
constexpr size_t NAME_MAX {255};
|
||||||
|
#endif
|
||||||
|
constexpr size_t LABEL_MAX {63};
|
||||||
constexpr size_t TTL_MAX {std::numeric_limits<int32_t>::max()};
|
constexpr size_t TTL_MAX {std::numeric_limits<int32_t>::max()};
|
||||||
|
|
||||||
constexpr size_t LABEL_BUFSIZE {LABEL_MAX + 1};
|
constexpr size_t LABEL_BUFSIZE {LABEL_MAX + 1};
|
||||||
|
|
|
@ -21,10 +21,14 @@ namespace ircd::rfc3986
|
||||||
IRCD_EXCEPTION(coding_error, encoding_error)
|
IRCD_EXCEPTION(coding_error, encoding_error)
|
||||||
IRCD_EXCEPTION(coding_error, decoding_error)
|
IRCD_EXCEPTION(coding_error, decoding_error)
|
||||||
|
|
||||||
|
#ifndef NAME_MAX
|
||||||
|
constexpr size_t DOMAIN_MAX { rfc1035::NAME_MAX };
|
||||||
|
#else
|
||||||
|
constexpr size_t DOMAIN_MAX { NAME_MAX };
|
||||||
|
#endif
|
||||||
|
constexpr size_t DOMAIN_BUFSIZE { DOMAIN_MAX + 1 };
|
||||||
constexpr size_t HOSTNAME_MAX { rfc1035::LABEL_MAX };
|
constexpr size_t HOSTNAME_MAX { rfc1035::LABEL_MAX };
|
||||||
constexpr size_t HOSTNAME_BUFSIZE { HOSTNAME_MAX + 1 };
|
constexpr size_t HOSTNAME_BUFSIZE { HOSTNAME_MAX + 1 };
|
||||||
constexpr size_t DOMAIN_MAX { rfc1035::NAME_MAX };
|
|
||||||
constexpr size_t DOMAIN_BUFSIZE { DOMAIN_MAX + 1 };
|
|
||||||
constexpr size_t REMOTE_MAX { DOMAIN_MAX + 6 };
|
constexpr size_t REMOTE_MAX { DOMAIN_MAX + 6 };
|
||||||
constexpr size_t REMOTE_BUFSIZE { REMOTE_MAX + 1 };
|
constexpr size_t REMOTE_BUFSIZE { REMOTE_MAX + 1 };
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,11 @@ get__query_directory(client &client,
|
||||||
{
|
{
|
||||||
static const size_t max_servers
|
static const size_t max_servers
|
||||||
{
|
{
|
||||||
size(buf) / rfc1035::NAME_MAX - 2
|
#ifdef NAME_MAX
|
||||||
|
size(buf) / NAME_MAX - 2
|
||||||
|
#else
|
||||||
|
size(buf) / rfc1035::NAME_MAX - 2
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const m::room::origins origins
|
const m::room::origins origins
|
||||||
|
|
Loading…
Reference in a new issue