I want to write some portable (as possible) C code to look up DNS TXT records. I would also prefer not to have dependencies on libraries that don't ship with the machine.
What is the best way to do this on Unix-like machines using standard libraries?
I found some sample code that works using libresolv, but it's not reentrant (not thread safe) and is very ugly. Is there a better way?
Also, what about Windows? If there were a way that worked there too that would be perfect.