summaryrefslogtreecommitdiffhomepage
path: root/dev/LibC++/defines.h
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-25 13:14:01 +0200
committerAmlal <amlal@nekernel.org>2025-04-25 13:14:01 +0200
commit20042235d1f53ae428aa154e64afdbae5d8d91ad (patch)
tree6ea42d1b30505a57301f8ff2916c78ce94ff6eaf /dev/LibC++/defines.h
parent0561a8d0a6ae7588309a6e3513bbfeeef5f0aa15 (diff)
meta: update .clang-format, format codebase.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibC++/defines.h')
-rw-r--r--dev/LibC++/defines.h57
1 files changed, 26 insertions, 31 deletions
diff --git a/dev/LibC++/defines.h b/dev/LibC++/defines.h
index 43cefb9..c0459ac 100644
--- a/dev/LibC++/defines.h
+++ b/dev/LibC++/defines.h
@@ -1,16 +1,15 @@
/* -------------------------------------------
- Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
#ifndef __LIBCOMPILER_DEFINES_H__
#define __LIBCOMPILER_DEFINES_H__
-extern "C"
-{
-#include <stdint.h>
+extern "C" {
#include <stddef.h>
+#include <stdint.h>
}
#ifndef __GNUC__
@@ -21,9 +20,9 @@ typedef __SIZE_TYPE__ size_t;
typedef long int ssize_t;
#else
typedef int ssize_t;
-#endif // __LP64__
+#endif // __LP64__
-typedef void* ptr_type;
+typedef void* ptr_type;
typedef __SIZE_TYPE__ size_type;
typedef size_t ptrdiff_t;
@@ -33,8 +32,8 @@ typedef void* any_t;
typedef char* caddr_t;
#ifndef NULL
-#define NULL ((voidptr_t)0)
-#endif // !null
+#define NULL ((voidptr_t) 0)
+#endif // !null
#ifdef __GNUC__
#include <LibC++/alloca.h>
@@ -45,12 +44,10 @@ typedef char* caddr_t;
#define __deref(ptr) (*(ptr))
#ifdef __cplusplus
-#define __init_decl() \
- extern "C" \
- {
+#define __init_decl() extern "C" {
#define __fini_decl() \
- } \
- ;
+ } \
+ ;
#else
#define __init_decl()
#define __fini_decl()
@@ -66,31 +63,29 @@ typedef char* caddr_t;
#warning ! alloca not detected !
#endif
-typedef long long off_t;
+typedef long long off_t;
typedef unsigned long long uoff_t;
typedef union float_cast {
- struct
- {
- unsigned int mantissa : 23;
- unsigned int exponent : 8;
- unsigned int sign : 1;
- };
-
- float f;
+ struct {
+ unsigned int mantissa : 23;
+ unsigned int exponent : 8;
+ unsigned int sign : 1;
+ };
+
+ float f;
} __attribute__((packed)) float_cast_t;
typedef union double_cast {
- struct
- {
- unsigned long long int mantissa : 52;
- unsigned int exponent : 11;
- unsigned int sign : 1;
- };
-
- double f;
+ struct {
+ unsigned long long int mantissa : 52;
+ unsigned int exponent : 11;
+ unsigned int sign : 1;
+ };
+
+ double f;
} __attribute__((packed)) double_cast_t;
-#endif // ifndef __GNUC__
+#endif // ifndef __GNUC__
#endif /* __LIBCOMPILER_DEFINES_H__ */