Header updates for C11 alignment functionality.

This includes the new header <stdalign.h>, the new function aligned_alloc(), and the new typedef max_align_t.
This commit is contained in:
Stephen Heumann 2020-01-12 18:37:50 -06:00
parent 84767f3340
commit d9ebdd10df
3 changed files with 19 additions and 0 deletions

16
ORCACDefs/stdalign.h Normal file
View File

@ -0,0 +1,16 @@
/****************************************************************
*
* stdalign.h - standard alignment macros
*
****************************************************************/
#ifndef __stdalign__
#define __stdalign__
#define alignas _Alignas
#define alignof _Alignof
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#endif

View File

@ -24,6 +24,8 @@ typedef long ptrdiff_t;
typedef unsigned long size_t;
#endif
typedef long max_align_t;
typedef unsigned short wchar_t;
#define offsetof(type,member) ((size_t) (&(((type *)0L)->member)))

View File

@ -39,6 +39,7 @@ typedef struct {long quot,rem;} ldiv_t;
int abs(int);
void abort(void);
void *aligned_alloc(size_t, size_t);
int atexit(void (*__func)(void));
double atof(const char *);
int atoi(const char *);