gmm_malloc.h: Only use <errno.h> and errno if __STDC_HOSTED__.

* config/i386/gmm_malloc.h: Only use <errno.h> and errno if
	__STDC_HOSTED__.

From-SVN: r274915
This commit is contained in:
Gerald Pfeifer 2019-08-25 22:25:23 +00:00 committed by Gerald Pfeifer
parent fed7268f74
commit 1460c0bbb7
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2019-08-26 Gerald Pfeifer <gerald@pfeifer.com>
* config/i386/gmm_malloc.h: Only use <errno.h> and errno if
__STDC_HOSTED__.
2019-08-23 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* config/mips/mips.md (mips_get_fcsr, *mips_get_fcsr): Use SI

View File

@ -25,7 +25,9 @@
#define _MM_MALLOC_H_INCLUDED
#include <stdlib.h>
#if __STDC_HOSTED__
#include <errno.h>
#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);
}