>> mccreedy 2004/09/15
16:45:18
>> >> src/modules/proxy mod_proxy.h >> Index: mod_proxy.h >> =================================================================== >> RCS file: /home/cvs/apache-1.3/src/modules/proxy/mod_proxy.h,v >> retrieving revision 1.62 >> retrieving revision 1.63 >> diff -u -r1.62 -r1.63 >> --- mod_proxy.h 17 Feb 2004 21:52:22 -0000 1.62 >> +++ mod_proxy.h 15 Sep 2004 23:45:18 -0000 1.63 >> @@ -213,7 +213,11 @@ >> >> struct per_thread_data { >> struct hostent hpbuf; >> +#ifdef TPF >> + u_int ipaddr; >> +#else >> u_long ipaddr; >> +#endif >> char *charpbuf[2]; >> }; >64-bit fix for TPF? looks like u_long is a hold-over from the very >old days and we should use in_addr_t wherever it exists, and define >in_addr_t appropriately on other platforms Since I can't #ifdef for the typedef of in_add_t I can only think
of three approaches to make this code generic:
1) Change the "u_int ipaddr;" line to "in_addr_t ipaddr;" and let
other platforms with in_addr_t add their platforms to the #ifdef TPF.
2) Ditch the #ifdef TPF and change the original "u_long ipaddr;" line
to "in_addr_t ipaddr;" for all platforms. This would force the ones that
don't have in_addr_t to change (by either typedef'ing in_addr_t to a u_long
or by adding an #ifdef fin mod_proxy.h or themselves).
3) Add a flag like "AP_HAVE_IN_ADDR_T to ap_config.h or some
other header file and using that to determine if "in_addr_t ipaddr;" should be
used in mod_proxy.h.
I'd prefer #1, unless there's a 4th option.
-David McCreedy |