summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-26 10:10:06 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-26 10:10:06 +0100
commitd532b43153cb68d6e92c5dac58cbd3c8ab4f60af (patch)
treee748d39deee4e4c0983354ccf3fa419263368f87
parentba1b968d17a1ed29694f850af58787c3eb2657d4 (diff)
feat! Use header guards instead of pragma once.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--include/CompilerKit/AST.h5
-rw-r--r--include/CompilerKit/CodeGenerator.h5
-rw-r--r--include/CompilerKit/Detail/32x0.h5
-rw-r--r--include/CompilerKit/Detail/64x0.h5
-rw-r--r--include/CompilerKit/Detail/AMD64.h5
-rw-r--r--include/CompilerKit/Detail/Aarch64.h5
-rw-r--r--include/CompilerKit/Detail/Power64.h5
-rw-r--r--include/CompilerKit/ErrorID.h5
-rw-r--r--include/CompilerKit/ErrorOr.h5
-rw-r--r--include/CompilerKit/PEF.h5
-rw-r--r--include/CompilerKit/Ref.h5
-rw-r--r--include/CompilerKit/Utilities/Assembler.h5
-rw-r--r--include/CompilerKit/Utilities/Compiler.h5
-rw-r--r--include/CompilerKit/Utilities/DLL.h5
-rw-r--r--include/DebuggerKit/DebuggerContract.h5
-rw-r--r--include/DebuggerKit/Detail/Config.h5
-rw-r--r--include/DebuggerKit/POSIXMachContract.h7
-rw-r--r--include/LibC++/__abi.h5
-rw-r--r--include/LibC++/base_alloc.h5
-rw-r--r--include/LibC++/base_exception.h5
-rw-r--r--include/LibC++/base_math.h5
-rw-r--r--include/LibC++/base_process.h5
-rw-r--r--include/LibC++/new.h5
-rw-r--r--include/ThirdParty/Dialogs/Dialogs.h5
24 files changed, 97 insertions, 25 deletions
diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h
index 2d63a1f..8f6b8fb 100644
--- a/include/CompilerKit/AST.h
+++ b/include/CompilerKit/AST.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_AST_H
+#define NECTAR_COMPILERKIT_AST_H
#include <CompilerKit/CodeGenerator.h>
#include <vector>
@@ -169,3 +170,5 @@ class ICompilerFrontend {
} // namespace CompilerKit
#include <CompilerKit/AST.inl>
+
+#endif // NECTAR_COMPILERKIT_AST_H
diff --git a/include/CompilerKit/CodeGenerator.h b/include/CompilerKit/CodeGenerator.h
index 28e9534..02202c3 100644
--- a/include/CompilerKit/CodeGenerator.h
+++ b/include/CompilerKit/CodeGenerator.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_CODEGENERATOR_H
+#define NECTAR_COMPILERKIT_CODEGENERATOR_H
#include <CompilerKit/Detail/Config.h>
#include <CompilerKit/Macros.h>
@@ -235,3 +236,5 @@ class EncoderPowerPC final : public IAssemblyEncoder {
#endif // __ASM_NEED_32x0__
} // namespace CompilerKit
+#endif // NECTAR_COMPILERKIT_CODEGENERATOR_H
+
diff --git a/include/CompilerKit/Detail/32x0.h b/include/CompilerKit/Detail/32x0.h
index 0bd43ee..eb68a5b 100644
--- a/include/CompilerKit/Detail/32x0.h
+++ b/include/CompilerKit/Detail/32x0.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_DETAIL_32X0_H
+#define NECTAR_COMPILERKIT_DETAIL_32X0_H
#include <CompilerKit/Detail/Config.h>
#include <vector>
@@ -93,3 +94,5 @@ inline std::vector<CpuCode32x0> kOpcodes32x0 = {
////////////////////////////////
+#endif // NECTAR_COMPILERKIT_DETAIL_32X0_H
+
diff --git a/include/CompilerKit/Detail/64x0.h b/include/CompilerKit/Detail/64x0.h
index b7fca8a..374ac76 100644
--- a/include/CompilerKit/Detail/64x0.h
+++ b/include/CompilerKit/Detail/64x0.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_DETAIL_64X0_H
+#define NECTAR_COMPILERKIT_DETAIL_64X0_H
#include <CompilerKit/Detail/Config.h>
#include <vector>
@@ -99,3 +100,5 @@ inline std::vector<CpuOpcode64x0> kOpcodes64x0 = {
////////////////////////////////
+#endif // NECTAR_COMPILERKIT_DETAIL_64X0_H
+
diff --git a/include/CompilerKit/Detail/AMD64.h b/include/CompilerKit/Detail/AMD64.h
index 4bc469a..fcf7867 100644
--- a/include/CompilerKit/Detail/AMD64.h
+++ b/include/CompilerKit/Detail/AMD64.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_DETAIL_AMD64_H
+#define NECTAR_COMPILERKIT_DETAIL_AMD64_H
#include <CompilerKit/Detail/Config.h>
#include <vector>
@@ -49,3 +50,5 @@ inline std::vector<CpuOpcodeAMD64> kOpcodesAMD64 = {
#define kAsmRegisterLimit 16
+#endif // NECTAR_COMPILERKIT_DETAIL_AMD64_H
+
diff --git a/include/CompilerKit/Detail/Aarch64.h b/include/CompilerKit/Detail/Aarch64.h
index fdfd2d9..e12262b 100644
--- a/include/CompilerKit/Detail/Aarch64.h
+++ b/include/CompilerKit/Detail/Aarch64.h
@@ -4,7 +4,8 @@ Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_DETAIL_AARCH64_H
+#define NECTAR_COMPILERKIT_DETAIL_AARCH64_H
#include <CompilerKit/Detail/Config.h>
#include <stdint.h>
@@ -40,3 +41,5 @@ typedef struct {
#define kAsmRegisterPrefix "x"
#define kOpcodeARM64Count (1000)
+#endif // NECTAR_COMPILERKIT_DETAIL_AARCH64_H
+
diff --git a/include/CompilerKit/Detail/Power64.h b/include/CompilerKit/Detail/Power64.h
index c3c15c4..48d09dc 100644
--- a/include/CompilerKit/Detail/Power64.h
+++ b/include/CompilerKit/Detail/Power64.h
@@ -8,7 +8,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_DETAIL_POWER64_H
+#define NECTAR_COMPILERKIT_DETAIL_POWER64_H
#include <stdint.h>
@@ -1556,3 +1557,5 @@ inline CpuOpcodePPC kOpcodesPowerPC[] = {
/* return address register */
#define kAsmRetRegister 19
+#endif // NECTAR_COMPILERKIT_DETAIL_POWER64_H
+
diff --git a/include/CompilerKit/ErrorID.h b/include/CompilerKit/ErrorID.h
index 1424014..0a2e666 100644
--- a/include/CompilerKit/ErrorID.h
+++ b/include/CompilerKit/ErrorID.h
@@ -7,7 +7,8 @@
* ========================================================
*/
-#pragma once
+#ifndef NECTAR_COMPILERKIT_ERRORID_H
+#define NECTAR_COMPILERKIT_ERRORID_H
#include <CompilerKit/Detail/Config.h>
@@ -28,3 +29,5 @@
#define NECTAR_FAT_ERROR -37
#define NECTAR_INVALID_ARCH -38
+#endif // NECTAR_COMPILERKIT_ERRORID_H
+
diff --git a/include/CompilerKit/ErrorOr.h b/include/CompilerKit/ErrorOr.h
index 8bb1b96..7891c4e 100644
--- a/include/CompilerKit/ErrorOr.h
+++ b/include/CompilerKit/ErrorOr.h
@@ -7,7 +7,8 @@
* ========================================================
*/
-#pragma once
+#ifndef NECTAR_COMPILERKIT_ERROROR_H
+#define NECTAR_COMPILERKIT_ERROROR_H
/// =========================================================== ///
/// @file ErrorOr.h
@@ -57,3 +58,5 @@ using ErrorOrAny = ErrorOr<VoidPtr>;
using ErrorOrString = ErrorOr<STLString>;
} // namespace CompilerKit
+#endif // NECTAR_COMPILERKIT_ERROROR_H
+
diff --git a/include/CompilerKit/PEF.h b/include/CompilerKit/PEF.h
index ae3979c..9655dd9 100644
--- a/include/CompilerKit/PEF.h
+++ b/include/CompilerKit/PEF.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_PEF_H
+#define NECTAR_COMPILERKIT_PEF_H
#include <CompilerKit/Detail/Config.h>
#include <fstream>
@@ -137,3 +138,5 @@ inline std::ifstream& operator>>(std::ifstream& fp, CompilerKit::PEFCommandHeade
return fp;
}
+#endif // NECTAR_COMPILERKIT_PEF_H
+
diff --git a/include/CompilerKit/Ref.h b/include/CompilerKit/Ref.h
index 400f9f8..5717a3a 100644
--- a/include/CompilerKit/Ref.h
+++ b/include/CompilerKit/Ref.h
@@ -8,7 +8,8 @@
* ========================================================
*/
-#pragma once
+#ifndef NECTAR_COMPILERKIT_REF_H
+#define NECTAR_COMPILERKIT_REF_H
#include <CompilerKit/Detail/Config.h>
@@ -97,3 +98,5 @@ using StrongAny = StrongRef<VoidPtr>;
using WeakAny = WeakRef<VoidPtr>;
} // namespace CompilerKit
+#endif // NECTAR_COMPILERKIT_REF_H
+
diff --git a/include/CompilerKit/Utilities/Assembler.h b/include/CompilerKit/Utilities/Assembler.h
index e13f1af..e43d451 100644
--- a/include/CompilerKit/Utilities/Assembler.h
+++ b/include/CompilerKit/Utilities/Assembler.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_UTILITIES_ASSEMBLER_H
+#define NECTAR_COMPILERKIT_UTILITIES_ASSEMBLER_H
#include <CompilerKit/AST.h>
#include <CompilerKit/CodeGenerator.h>
@@ -94,3 +95,5 @@ inline NumberCast32 GetNumber32(STLString lineBuffer, STLString numberKey) {
}
}
} // namespace CompilerKit
+
+#endif // NECTAR_COMPILERKIT_UTILITIES_ASSEMBLER_H
diff --git a/include/CompilerKit/Utilities/Compiler.h b/include/CompilerKit/Utilities/Compiler.h
index 94060ea..8d00de0 100644
--- a/include/CompilerKit/Utilities/Compiler.h
+++ b/include/CompilerKit/Utilities/Compiler.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
+#define NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
#include <CompilerKit/AST.h>
#include <CompilerKit/CodeGenerator.h>
@@ -120,3 +121,5 @@ inline void drvi_crash_handler(std::int32_t id) {
}
} // namespace CompilerKit::Detail
+#endif // NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
+
diff --git a/include/CompilerKit/Utilities/DLL.h b/include/CompilerKit/Utilities/DLL.h
index c6fcd49..1f84bb8 100644
--- a/include/CompilerKit/Utilities/DLL.h
+++ b/include/CompilerKit/Utilities/DLL.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_COMPILERKIT_UTILITIES_DLL_H
+#define NECTAR_COMPILERKIT_UTILITIES_DLL_H
#include <CompilerKit/Detail/Config.h>
#include <dlfcn.h>
@@ -68,3 +69,5 @@ class DLLLoader final {
};
} // namespace CompilerKit
+#endif // NECTAR_COMPILERKIT_UTILITIES_DLL_H
+
diff --git a/include/DebuggerKit/DebuggerContract.h b/include/DebuggerKit/DebuggerContract.h
index 4f02b90..1d8c3bc 100644
--- a/include/DebuggerKit/DebuggerContract.h
+++ b/include/DebuggerKit/DebuggerContract.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H
+#define NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H
#include <DebuggerKit/Detail/Config.h>
#include <unordered_map>
@@ -44,3 +45,5 @@ class IDebuggerContract {
};
} // namespace DebuggerKit
+#endif // NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H
+
diff --git a/include/DebuggerKit/Detail/Config.h b/include/DebuggerKit/Detail/Config.h
index 4437e8a..87fbe22 100644
--- a/include/DebuggerKit/Detail/Config.h
+++ b/include/DebuggerKit/Detail/Config.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_DEBUGGERKIT_DETAIL_CONFIG_H
+#define NECTAR_DEBUGGERKIT_DETAIL_CONFIG_H
/// =========================================================== ///
/// @author Amlal El Mahrouss
@@ -64,3 +65,5 @@ namespace Detail {
using dk_socket_type = int64_t;
} // namespace Detail
} // namespace DebuggerKit
+
+#endif // NECTAR_DEBUGGERKIT_DETAIL_CONFIG_H
diff --git a/include/DebuggerKit/POSIXMachContract.h b/include/DebuggerKit/POSIXMachContract.h
index 438eae0..22b8958 100644
--- a/include/DebuggerKit/POSIXMachContract.h
+++ b/include/DebuggerKit/POSIXMachContract.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_DEBUGGERKIT_POSIXMACHCONTRACT_H
+#define NECTAR_DEBUGGERKIT_POSIXMACHCONTRACT_H
#ifdef DK_MACH_DEBUGGER
@@ -152,5 +153,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT {
};
} // namespace DebuggerKit::POSIX
-#endif
+#endif // DK_MACH_DEBUGGER
+
+#endif // NECTAR_DEBUGGERKIT_POSIXMACHCONTRACT_H
diff --git a/include/LibC++/__abi.h b/include/LibC++/__abi.h
index e63b9b5..e1f2310 100644
--- a/include/LibC++/__abi.h
+++ b/include/LibC++/__abi.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_ABI_H
+#define NECTAR_LIBCXX_ABI_H
#include <LibC++/base_process.h>
#include <LibC++/defines.h>
@@ -20,3 +21,5 @@ inline void __compilerkit_unreachable(void) {
}
__fini_decl()
+
+#endif // NECTAR_LIBCXX_ABI_H
diff --git a/include/LibC++/base_alloc.h b/include/LibC++/base_alloc.h
index 96a8161..f8d9dbc 100644
--- a/include/LibC++/base_alloc.h
+++ b/include/LibC++/base_alloc.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_BASE_ALLOC_H
+#define NECTAR_LIBCXX_BASE_ALLOC_H
#include <LibC++/defines.h>
@@ -42,3 +43,5 @@ inline void release_nothrow(KindClass ptr) noexcept {
}
} // namespace std::base_alloc
+#endif // NECTAR_LIBCXX_BASE_ALLOC_H
+
diff --git a/include/LibC++/base_exception.h b/include/LibC++/base_exception.h
index 571e244..6148a90 100644
--- a/include/LibC++/base_exception.h
+++ b/include/LibC++/base_exception.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_BASE_EXCEPTION_H
+#define NECTAR_LIBCXX_BASE_EXCEPTION_H
#include <LibC++/__abi.h>
#include <LibC++/base_process.h>
@@ -36,3 +37,5 @@ inline void __throw_bad_array_new_length(const char* what) {
}
} // namespace std::base_exception::abi
+#endif // NECTAR_LIBCXX_BASE_EXCEPTION_H
+
diff --git a/include/LibC++/base_math.h b/include/LibC++/base_math.h
index c9f390d..80b222e 100644
--- a/include/LibC++/base_math.h
+++ b/include/LibC++/base_math.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_BASE_MATH_H
+#define NECTAR_LIBCXX_BASE_MATH_H
#include <defines>
@@ -97,3 +98,5 @@ typename<class Result> using callable_type = Result (*)(size_t n, ...);
#define __cpp_lib_base_math 1
#endif
+#endif // NECTAR_LIBCXX_BASE_MATH_H
+
diff --git a/include/LibC++/base_process.h b/include/LibC++/base_process.h
index a3e3147..316b5a0 100644
--- a/include/LibC++/base_process.h
+++ b/include/LibC++/base_process.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_BASE_PROCESS_H
+#define NECTAR_LIBCXX_BASE_PROCESS_H
#include <defines>
@@ -44,3 +45,5 @@ __fini_decl()
}
} // namespace std::base_process
+#endif // NECTAR_LIBCXX_BASE_PROCESS_H
+
diff --git a/include/LibC++/new.h b/include/LibC++/new.h
index 111e1aa..d40c49a 100644
--- a/include/LibC++/new.h
+++ b/include/LibC++/new.h
@@ -4,7 +4,8 @@
======================================== */
-#pragma once
+#ifndef NECTAR_LIBCXX_NEW_H
+#define NECTAR_LIBCXX_NEW_H
#include <defines>
@@ -64,3 +65,5 @@ void operator delete(void*, size_t) noexcept;
void operator delete[](void*) noexcept;
+#endif // NECTAR_LIBCXX_NEW_H
+
diff --git a/include/ThirdParty/Dialogs/Dialogs.h b/include/ThirdParty/Dialogs/Dialogs.h
index f632026..8168dd2 100644
--- a/include/ThirdParty/Dialogs/Dialogs.h
+++ b/include/ThirdParty/Dialogs/Dialogs.h
@@ -10,7 +10,8 @@
// See http://www.wtfpl.net/ for more details.
//
-#pragma once
+#ifndef NECTAR_THIRDPARTY_DIALOGS_DIALOGS_H
+#define NECTAR_THIRDPARTY_DIALOGS_DIALOGS_H
#if _WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -1736,3 +1737,5 @@ inline std::string select_folder::result() {
#endif // PFD_SKIP_IMPLEMENTATION
} // namespace pfd
+
+#endif // NECTAR_THIRDPARTY_DIALOGS_DIALOGS_H