apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Edwards <a...@us.ibm.com>
Subject Re: cvs commit: apr/network_io/win32 sendrecv.c
Date Fri, 01 Oct 2004 18:53:21 GMT
William A. Rowe, Jr. wrote:
> 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

Mime
View raw message