+2013-09-18 Paul Smith <psmith@gnu.org>
+
+ * main.c (main): Set starting_directory before we write any
+ errors. Fixes Savannah bug #40043.
+
2013-09-16 Eli Zaretskii <eliz@gnu.org>
* output.c [WINDOWS32]: Include windows.h and sub_proc.h, to avoid
#endif /* WINDOWS32 */
#endif
+ /* We may move, but until we do, here we are. */
+ starting_directory = current_directory;
+
#ifdef MAKE_JOBSERVER
/* If the jobserver-fds option is seen, make sure that -j is reasonable.
This can't be usefully set in the makefile, and we want to verify the
construct_include_path (include_directories == 0
? 0 : include_directories->list);
- /* Figure out where we are now, after chdir'ing. */
- if (directories == 0)
- /* We didn't move, so we're still in the same place. */
- starting_directory = current_directory;
- else
+ /* If we chdir'ed, figure out where we are now. */
+ if (directories)
{
#ifdef WINDOWS32
if (getcwd_fs (current_directory, GET_PATH_MAX) == 0)