|
26 | 26 | #include<unistd.h> |
27 | 27 |
|
28 | 28 | #ifndefFRONTEND |
29 | | -/* We use only 3-parameter elog calls in this file, for simplicity */ |
| 29 | +/* We use only 3- and 4-parameter elog calls in this file, for simplicity */ |
30 | 30 | /* NOTE: caller must provide gettext call around str! */ |
31 | 31 | #definelog_error(str,param)elog(LOG, str, param) |
| 32 | +#definelog_error4(str,param,arg1)elog(LOG, str, param, arg1) |
32 | 33 | #else |
33 | 34 | #definelog_error(str,param)(fprintf(stderr, str, param), fputc('\n', stderr)) |
| 35 | +#definelog_error4(str,param,arg1)(fprintf(stderr, str, param, arg1), fputc('\n', stderr)) |
34 | 36 | #endif |
35 | 37 |
|
36 | 38 | #ifdefWIN32_ONLY_COMPILER |
@@ -252,7 +254,7 @@ resolve_symlinks(char *path) |
252 | 254 | *lsep='\0'; |
253 | 255 | if (chdir(path)==-1) |
254 | 256 | { |
255 | | -log_error(_("could not change directory to \"%s\""),path); |
| 257 | +log_error4(_("could not change directory to \"%s\": %s"),path,strerror(errno)); |
256 | 258 | return-1; |
257 | 259 | } |
258 | 260 | fname=lsep+1; |
@@ -288,7 +290,7 @@ resolve_symlinks(char *path) |
288 | 290 |
|
289 | 291 | if (chdir(orig_wd)==-1) |
290 | 292 | { |
291 | | -log_error(_("could not change directory to \"%s\""),orig_wd); |
| 293 | +log_error4(_("could not change directory to \"%s\": %s"),orig_wd,strerror(errno)); |
292 | 294 | return-1; |
293 | 295 | } |
294 | 296 | #endif/* HAVE_READLINK */ |
|