[Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported
Ian Romanick
idr at freedesktop.org
Thu Aug 1 09:51:24 PDT 2013
Do you have specific platforms in mind? Are these autoconf platforms or
scons platforms? If it's the former, I'd rather just use the
HAVE_<function> macros that's standard for autoconf builds. I recall
trying to use __STDC_VERSION__ for various things in Mesa in the past,
but we found that some platforms lie (either higher or lower!).
On 08/01/2013 12:27 AM, Jonathan Gray wrote:
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> ---
> src/mesa/main/imports.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git src/mesa/main/imports.h src/mesa/main/imports.h
> index 53e40b4..aa7dc49 100644
> --- src/mesa/main/imports.h
> +++ src/mesa/main/imports.h
> @@ -230,7 +230,7 @@ static inline int IS_INF_OR_NAN( float x )
> *** LDEXPF: multiply value by an integral power of two
> *** FREXPF: extract mantissa and exponent from value
> ***/
> -#if defined(__gnu_linux__)
> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
> /* C99 functions */
> #define CEILF(x) ceilf(x)
> #define FLOORF(x) floorf(x)
>
More information about the mesa-dev
mailing list