From: Gerald Pfeifer Date: Sun, 25 Aug 2019 22:25:23 +0000 (+0000) Subject: gmm_malloc.h: Only use and errno if __STDC_HOSTED__. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1460c0bbb7fbb9f4a019d1d97cdc2bb79c9e2833;p=gcc.git gmm_malloc.h: Only use and errno if __STDC_HOSTED__. * config/i386/gmm_malloc.h: Only use and errno if __STDC_HOSTED__. From-SVN: r274915 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 989dff795f7..f7519204782 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-08-26 Gerald Pfeifer + + * config/i386/gmm_malloc.h: Only use and errno if + __STDC_HOSTED__. + 2019-08-23 Mihailo Stojanovic * config/mips/mips.md (mips_get_fcsr, *mips_get_fcsr): Use SI diff --git a/gcc/config/i386/gmm_malloc.h b/gcc/config/i386/gmm_malloc.h index b9886555956..cfe6046ec33 100644 --- a/gcc/config/i386/gmm_malloc.h +++ b/gcc/config/i386/gmm_malloc.h @@ -25,7 +25,9 @@ #define _MM_MALLOC_H_INCLUDED #include +#if __STDC_HOSTED__ #include +#endif static __inline__ void * _mm_malloc (size_t __size, size_t __align) @@ -36,7 +38,9 @@ _mm_malloc (size_t __size, size_t __align) /* Error if align is not a power of two. */ if (__align & (__align - 1)) { +#if __STDC_HOSTED__ errno = EINVAL; +#endif return ((void *) 0); }