At 12:21 PM 10/1/2004, Greg Marr wrote:
#ifdef DWORD_MAX #define APR_DWORD_MAX DWORD_MAX #else #define APR_DWORD_MAX 0xFFFFFFFFUL #endif
Defining DWORD_MAX at all could cause problems if it was defined by a later header file.
++1, this is the right solution, and infinitely more legible.
Not wishing to flog a dead horse too long... if DWORD_MAX is picked up from the Windows headers it is 0xFFFFFFFF and loses the UL we dutifully added in the #else clause. My suggestion was to drop the #ifdef DWORD_MAX and simply have
#define APR_DWORD_MAX 0xFFFFFFFFUL
Allan