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:
parent
fed7268f74
commit
1460c0bbb7
@ -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>
|
2019-08-23 Mihailo Stojanovic <mistojanovic@wavecomp.com>
|
||||||
|
|
||||||
* config/mips/mips.md (mips_get_fcsr, *mips_get_fcsr): Use SI
|
* config/mips/mips.md (mips_get_fcsr, *mips_get_fcsr): Use SI
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#define _MM_MALLOC_H_INCLUDED
|
#define _MM_MALLOC_H_INCLUDED
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#if __STDC_HOSTED__
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static __inline__ void *
|
static __inline__ void *
|
||||||
_mm_malloc (size_t __size, size_t __align)
|
_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. */
|
/* Error if align is not a power of two. */
|
||||||
if (__align & (__align - 1))
|
if (__align & (__align - 1))
|
||||||
{
|
{
|
||||||
|
#if __STDC_HOSTED__
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
|
#endif
|
||||||
return ((void *) 0);
|
return ((void *) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user