1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Rename and undef symbols that conflict with macro names on DNS

The undefs are a temporary fix until we get rid of the old,
conflicting, names

Fixes #141
Fixes #58
This commit is contained in:
Matias Fontanini
2016-04-02 09:16:28 -07:00
parent ec1634d6d8
commit 48022d3a3f
2 changed files with 60 additions and 43 deletions

View File

@@ -40,6 +40,14 @@
#include "pdu.h"
#include "endianness.h"
// Undefining some macros that conflict with some symbols here.
// Eventually, the conflicting names will be removed, but until then
// this is the best we can do.
// - IN is defined by winsock2.h
// - CERT is defined by openssl
#undef IN
#undef CERT
namespace Tins {
namespace Memory {
@@ -130,7 +138,7 @@ public:
ATMA,
NAPTR,
KX,
CERT,
CERTIFICATE,
A6,
DNAM,
SINK,
@@ -144,13 +152,23 @@ public:
DNSKEY,
DHCID,
NSEC3,
NSEC3PARAM
NSEC3PARAM,
CERT = CERTIFICATE
};
enum QueryClass {
IN = 1,
CH = 3,
HS = 4,
INTERNET = 1,
CHAOS = 3,
HESIOD = 4,
/**
* \cond
*/
IN = INTERNET,
CH = CHAOS,
HS = HESIOD,
/**
* \endcond
*/
ANY = 255
};