wahern / dns

dns.c: Single file non-blocking DNS C library without callbacks or external dependencies.
http://25thandclement.com/~william/projects/dns.c.html
MIT License
256 stars 64 forks source link

C++ compatibility #31

Open ktb92677 opened 5 years ago

ktb92677 commented 5 years ago

Why on God's green earth would you guys declare a variable "class" in your C source file. It makes it impossible to include in a C++ source file without a hack like this:

extern "C" {
#define class klass
#include "dns.h"
#undef class
}

Can this be fixed?