Re: [reSIProcate] IPv6 on 64 bit
On 19/07/13 17:14, Byron Campen wrote:
>
> Generally, we use the resip-defined UInt32, but something that we may
> want to start thinking about is to move over to using the now standard
> integer types defined in c++-11. Not sure how far back support for
> these goes; we may need to supply typedefs for them in some cases, but
> we should start building the good habit now.
>
Using the new types will make it more natural for people new to the
codebase as well
I'm going to start doing this in trunk today and we simply need to have
a plan for compatibility before taking it into the release branch
I would propose that:
- with a C++11 build, we use <cstdint> (#if __cplusplus >= 201103L)
and define stuff like:
using std::uint8_t;
using std::uint32_t;
because we are not "using namespace std;" in every source file.
- we fall back to <stdint.h> if possible (#ifdef HAVE_STDINT_H from
autotools / config.h)
- if that fails, we define the C++11 types ourselves in
rutil/compat.hxx (#ifndef uint32_t) using typedef
Does this seem reasonable and likely to work widely? Have you seen
alternative approaches or extra things I should add?