Make a common header for attribute shorthands

This commit is contained in:
apio 2022-11-19 17:18:51 +01:00
parent 648bd3fb61
commit b8c136eeb4
4 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#pragma once
#include <FormatAttribute.h>
#include <Attributes.h>
#include <Types.h>
template <typename T> class Result;

6
luna/Attributes.h Normal file
View File

@ -0,0 +1,6 @@
#pragma once
#define _weak __attribute__((weak))
#define _format(n, m) __attribute__((format(printf, n, m)))
#define _align(x) __attribute__((aligned(x)))
#define _noreturn __attribute__((noreturn))

View File

@ -1,6 +1,6 @@
#pragma once
#include <Attributes.h>
#include <CType.h>
#include <FormatAttribute.h>
#include <Result.h>
#include <stdarg.h>

View File

@ -1,2 +0,0 @@
#pragma once
#define _format(n, m) __attribute__((format(printf, n, m)))