I pushed a patch earlier that *should* make mkdir and getpid work with msvc

Dylan

Quoting Andres Gomez (2018-08-01 11:53:04)
> Opt-out the code using mkdir() and getpid() which are spitting
> warnings in the MSVC build:
> 
>   Compiling src\gallium\auxiliary\driver_ddebug\dd_draw.c ...
> dd_draw.c
> c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(62): warning 
> C4013: 'mkdir' undefined; assuming extern returning int
> c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(65): warning 
> C4013: 'getpid' undefined; assuming extern returning int
> 
> Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to 
> improve build times")
> Cc: Marek Olšák <marek.ol...@amd.com>
> Cc: Brian Paul <bri...@vmware.com>
> Cc: Roland Scheidegger <srol...@vmware.com>
> Cc: Nicolai Hähnle <nicolai.haeh...@amd.com>
> Signed-off-by: Andres Gomez <ago...@igalia.com>
> ---
>  src/gallium/auxiliary/driver_ddebug/dd_util.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/auxiliary/driver_ddebug/dd_util.h 
> b/src/gallium/auxiliary/driver_ddebug/dd_util.h
> index 7720e9af9ca..681627c83cb 100644
> --- a/src/gallium/auxiliary/driver_ddebug/dd_util.h
> +++ b/src/gallium/auxiliary/driver_ddebug/dd_util.h
> @@ -60,11 +60,15 @@ dd_get_debug_filename_and_mkdir(char *buf, size_t buflen, 
> bool verbose)
>  
>     util_snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", 
> "."));
>  
> +#ifdef PIPE_OS_UNIX
>     if (mkdir(dir, 0774) && errno != EEXIST)
>        fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
>  
>     util_snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(),
>                   p_atomic_inc_return(&index) - 1);
> +#else
> +   fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
> +#endif
>  
>     if (verbose)
>        fprintf(stderr, "dd: dumping to file %s\n", buf);
> -- 
> 2.18.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to