Re: [PATCH v4 14/14] the "compile" command

Yao Qi
2014-12-14T06:05:24Z

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> +static const char *
> +get_compile_file_tempdir (void)
> +{
> + static char *tempdir_name;
> +
> +#define TEMPLATE TMP_PREFIX "XXXXXX"
> + char tname[sizeof (TEMPLATE)];
> +
> + if (tempdir_name != NULL)
> + return tempdir_name;
> +
> + strcpy (tname, TEMPLATE);
> +#undef TEMPLATE
> + tempdir_name = mkdtemp (tname);

Hi Jan,
The build on mingw host is broken because mingw has no mkdtemp.

../../../git/gdb/compile/compile.c: In function 'get_compile_file_tempdir':
../../../git/gdb/compile/compile.c:194:3: error: implicit declaration of function 'mkdtemp' [-Werror=implicit-function-declaration]
tempdir_name = mkdtemp (tname);
^
../../../git/gdb/compile/compile.c:194:16: error: assignment makes pointer from integer without a cast [-Werror]
tempdir_name = mkdtemp (tname);
^
cc1: all warnings being treated as errors

--
Yao (齐尧)