This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 3/6] Move mkdir_recursive to common/filestuff.c
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> What do you think about this?
Thanks for doing this.
Simon> /* See common/pathstuff.h. */
Simon> +std::string
Simon> +get_standard_temp_dir ()
Simon> +{
Simon> +#ifdef WIN32
Simon> + char *tmp = getenv ("TMP");
Simon> + if (tmp != nullptr)
Simon> + return tmp;
Simon> +
Simon> + tmp = getenv ("TEMP");
Simon> + if (tmp != nullptr)
Simon> + return tmp;
Simon> +
Simon> + error (_("Couldn't find temp dir path, both TMP and TEMP are unset."));
Simon> +
Simon> +#else
Simon> + return "/tmp";
It would be normal to look at TMPDIR on unix systems.
Tom