First, the NETWARE part has to be above your additions.The reason I put the NETWARE part below the first new code was because I assumed (perhaps incorrectly) that there was no way that Apache or library functions it called were going to mess with the value returned by WSAGetLastError(), but possibly they might mess with errno, so by setting errno right before calling ap_log_error() there wouldn't be any problems.
Doesn't a file write mess with WSAGetLastError? *shrug* log_error_core uses a temp variable to save and restore errno, which is why setting errno first is more reliable.
Er, right, what Jim said -- I forgot that ap_log_error is already varargs.Second, change the ap_log_error to the variable args version rather than using a temporary buffer and ap_snprintf.I'm afraid you've lost me here. What function is there to use in place of ap_log_error()? Somehow use ap_pstrcat() and pass the buffer it builds to ap_log_error()?
The important bit was to get rid of the buf.
....Roy