> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Trawick
> Sent: 11 March 2002 15:17
> "Sander Striker" <[EMAIL PROTECTED]> writes:
>
>> Hi,
>>
>> server/mpm_common.c:363
>> #if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) ||
>defined(TPF) || defined(__TANDEM) || defined(OS2) ||
>> defined(WIN32) || defined(NETWARE)
>>
>> Can I break this line into smaller chunks? If so, how?
>> I seem a bit rusty on how the various preprocessors handle
>> multiline #ifs (if they even do).
>
> Look in ap_config.h for the way to do it (look for "SUNOS4")
>
> Why not move this OS-specific stuff to ap_config.h and define
> AP_HAVE_SUPLEMENTARY_GROUPS if we aren't on one of those platforms,
> and then use AP_HAVE_SUPPLEMENTARY_GROUPS to see what to do?
>
> (I'm assuming that the presence of setgrent() and friends isn't good
> enough to make the decision.)
Takers?
>> server/mpm_common.c:442
>> rv = apr_file_close(pod->pod_in);
>> if (rv != APR_SUCCESS) {
>> return rv;
>> }
>>
>> return rv;
>> }
>>
>> If we are going to waste the if, we might aswell return
>> APR_SUCCESS, no?
>
> plenty of ways to skin a cat, all of them good
As a cat owner I sincerely how this is a figure of speech... :)
> as for this code, go for the APR_SUCCESS (you're left with a trade-off
> between compactness vs. using a style that can be extended if more
> work is added later)
Yah. Will do. Just raising this for anyone else coding in this kind
of style.
Sander