[EMAIL PROTECTED] wrote:
>gstein 2003/11/02 12:51:18
>
> Modified: include/arch/os2 apr_arch_networkio.h
> include/arch/unix apr_arch_networkio.h
> include/arch/win32 apr_arch_networkio.h
> network_io/unix sendrecv.c sockets.c sockopt.c
> network_io/win32 sockets.c sockopt.c
> Log:
> The use of "netmask" to hold options is a bit beyond bogus. That term has
> an entirely different meaning in a networking context. Rename the socket
> field to "options".
>
> Also simplified the test/set macros to just take a socket.
>
> * include/arch/os2/apr_arch_networkio.h:
> * include/arch/unix/apr_arch_networkio.h:
> * include/arch/win32/apr_arch_networkio.h:
> - perform adjustments as above. change all uses.
>
>
[...]
> 1.3 +6 -4 apr/include/arch/win32/apr_arch_networkio.h
>
>
[...]
> @@ -98,13 +98,15 @@
> int apr_inet_pton(int af, const char *src, void *dst);
> void apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);
>
> -#define apr_is_option_set(mask, option) ((mask & option) ==option)
> +#define apr_is_option_set(skt, option) \
> + (((skt)->options & (option)) == (option))
> +
> #define apr_set_option(mask, option, on) \
> do { \
> if (on) \
> - *mask |= option; \
> + *(mask) |= (option); \
> else \
> - *mask &= ~option; \
> + *(mask) &= ~(option); \
> } while (0)
>
> #endif /* ! NETWORK_IO_H */
>
>
Any particular reason for this macro not being the same as the Unix
version, except making an evil attack on Win32 buildability? :-)
--
Brane Äibej <[EMAIL PROTECTED]> http://www.xbc.nu/brane/