libc: add an internal macros.h header with headers to make attributes less verbose

This commit is contained in:
apio 2022-10-04 19:06:56 +02:00
parent c6ed8d2abb
commit a050ed9133
3 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1,8 @@
#ifndef __MACROS_H
#define __MACROS_H
#define noreturn __attribute__((noreturn))
#define align(n) __attribute__((aligned(n)))
#define deprecated(msg) __attribute__((deprecated(msg)))
#endif

View File

@ -1,10 +1,9 @@
#ifndef _LUNA_H
#define _LUNA_H
#include <_/macros.h>
#include <sys/types.h>
#define noreturn __attribute__((noreturn))
#ifdef __cplusplus
extern "C"
{

View File

@ -1,10 +1,9 @@
#ifndef _STDLIB_H
#define _STDLIB_H
#include <_/macros.h>
#include <stddef.h>
#define noreturn __attribute__((noreturn))
#ifdef __cplusplus
extern "C"
{