mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
85 lines
1.8 KiB
C
85 lines
1.8 KiB
C
//----------------------------------------------------------------------------//
|
|
// GNU GPL OS/K //
|
|
// //
|
|
// Authors: spectral` //
|
|
// NeoX //
|
|
// //
|
|
// Desc: Kaleid general preprocessor constants //
|
|
//----------------------------------------------------------------------------//
|
|
|
|
#ifndef _KALBASE_BDEFS_H
|
|
#define _KALDEFS_BDEFS_H
|
|
|
|
//------------------------------------------//
|
|
|
|
#ifndef TRUE
|
|
#define TRUE 1
|
|
#endif
|
|
|
|
#ifndef FALSE
|
|
#define FALSE 0
|
|
#endif
|
|
|
|
#ifndef NULL
|
|
#define NULL 0L
|
|
#endif
|
|
|
|
#ifndef INITOK
|
|
#define INITOK ((unsigned int)0xCAFEBABE)
|
|
#endif
|
|
|
|
//------------------------------------------//
|
|
|
|
#ifndef __alignof_is_defined
|
|
#define __alignof_is_defined
|
|
#define alignof _Alignof
|
|
#endif
|
|
|
|
#ifndef __alignas_is_defined
|
|
#define __alignas_is_defined
|
|
#define alignas _Alignas
|
|
#endif
|
|
|
|
#ifndef __bool_true_false_are_defined
|
|
#define __bool_true_false_are_defined
|
|
# define bool _Bool
|
|
# define true 1
|
|
# define false 0
|
|
# ifndef TRUE
|
|
# define TRUE 1
|
|
# endif
|
|
# ifndef FALSE
|
|
# define FALSE 0
|
|
# endif
|
|
#endif
|
|
|
|
//------------------------------------------//
|
|
|
|
#ifndef _PACKED
|
|
#define _PACKED __attribute__((__packed__))
|
|
#endif
|
|
|
|
#ifndef noreturn
|
|
#define noreturn __attribute__((__noreturn__))
|
|
#endif
|
|
|
|
#ifndef likely
|
|
#define likely(x) (__builtin_expect((x), 1))
|
|
#endif
|
|
|
|
#ifndef unlikely
|
|
#define unlikely(x) (__builtin_expect((x), 0))
|
|
#endif
|
|
|
|
#ifndef _STR
|
|
#define _STR(x) #x
|
|
#endif
|
|
|
|
#ifndef _XSTR
|
|
#define _XSTR(x) _STR(x)
|
|
#endif
|
|
|
|
//------------------------------------------//
|
|
|
|
#endif
|