Commit ce37b7aa authored by miguel@hegel.local's avatar miguel@hegel.local

Use on Unix hostname.err only when --log-error=path.

Asked by Heikki and Peter.
parent 9199252c
...@@ -2214,6 +2214,7 @@ int main(int argc, char **argv) ...@@ -2214,6 +2214,7 @@ int main(int argc, char **argv)
{ {
if (log_error_file_ptr != log_error_file) if (log_error_file_ptr != log_error_file)
strmake(log_error_file, log_error_file_ptr, sizeof(log_error_file)); strmake(log_error_file, log_error_file_ptr, sizeof(log_error_file));
#ifdef __WIN__
else else
{ {
char *end; char *end;
...@@ -2224,6 +2225,7 @@ int main(int argc, char **argv) ...@@ -2224,6 +2225,7 @@ int main(int argc, char **argv)
*strxnmov(end, sizeof(log_error_file)-length-1, *strxnmov(end, sizeof(log_error_file)-length-1,
glob_hostname, ".err", NullS)= 0; glob_hostname, ".err", NullS)= 0;
} }
#endif
if (log_error_file[0] != 0) if (log_error_file[0] != 0)
if (freopen(log_error_file, "a+", stdout)) if (freopen(log_error_file, "a+", stdout))
freopen(log_error_file, "a+", stderr); freopen(log_error_file, "a+", stderr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment