
AMDG Todd Nine wrote:
I'm in the process of updating the 2.9.22 source of PowerDNS to be a bit more "Windows Friendly" and building it with Visual C++ 8 (2008). However, I'm having some issues I could use a hand with. Specifically, the authors of powerdns define their own following types
#ifdef NEED_POSIX_TYPEDEF typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; #endif
These types are used extensively in the code. Rather than prefix each reference with the boost:: namspace, I would like to make boot the standard namespace for these data types.
Does this do what you want? #ifdef NEED_POSIX_TYPEDEF #include <boost/cstdint.hpp> using boost::unit8_t; using boost::uint16_t; using boost::uint32_t; using boost::uint64_t; #endif This is a little tricky because if you platform already has stdint.h, these typedefs will already be defined in the global namespace so redefining them is an error.
Everything includes the header file with the definition above, is there a way for me to do this? I haven't done C and C++ in 9 years, and even then only on very small projects and small patches, so your help is greatly appreciated.
In Christ, Steven Watanabe