[HarfBuzz] build breakage with msvc

Behdad Esfahbod behdad at behdad.org
Thu Apr 29 10:53:34 PDT 2010


Fixed.  Thanks.

On 04/29/2010 10:03 AM, Jonathan Kew wrote:
> The use of __PRETTY_FUNCTION__ is non-portable, and breaks the build on Windows with MSVC.
> 
> For now, I'm working around this with
> 
> ---------------------------------------
> diff --git a/gfx/harfbuzz/src/hb-private.h b/gfx/harfbuzz/src/hb-private.h
> --- a/gfx/harfbuzz/src/hb-private.h
> +++ b/gfx/harfbuzz/src/hb-private.h
> @@ -132,16 +132,17 @@
>  
>  #if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
>  #define snprintf _snprintf
>  #endif
>  
>  #ifdef _MSC_VER
>  #undef inline
>  #define inline __inline
> +#define __PRETTY_FUNCTION__ __FUNCSIG__
>  #endif
>  
>  #ifdef __STRICT_ANSI__
>  #undef inline
>  #define inline __inline__
>  #endif
>  
>  
> ----------------------------------------
> 
> but this could fail with other non-gcc compilers, too. It would probably be better to use a private HB_FUNC macro, and #define this to __PRETTY_FUNCTION__ or __FUNCSIG__ for gcc and msvc respectively. For unknown compilers, default to __func__.
> 
> 
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list