Add guards around std library headers (#3013)

* Last fix for standard compiler error

* adding define guards around headers

* rename cmath.h and climits.h to cmath and climits respectively

* renaming cstdarg.h to cstdarg

* renaming cstdlib.h to cstdlib

* renaming cstring.h to cstring

* renaming cstdio.h to cstdio

* renaming cmath locale ctype

* renaming stdarg string and va_list

* renaming cstddef

* renaming stdio stddef stdlib

* renaming algorithm, functional, iterator, memory, and utility

* renaming bitset, cstdint, limits, and stdint

* renaming new and type_traits

* update quote includes for standard library headers to angle bracket includes
This commit is contained in:
kipcode66
2026-01-05 06:50:45 -05:00
committed by GitHub
parent b897ed3ec9
commit 1d2a0d9568
342 changed files with 422 additions and 398 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
#define J2DPRINT_H
#include "JSystem/J2DGraph/J2DTextBox.h"
#include <stdarg.h>
#include <stdarg>
class JUTFont;
class J2DPrint;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "JSystem/J3DGraphBase/J3DShape.h"
#include <stdint.h>
#include <stdint>
class J3DJoint;
class J3DMaterialAnm;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "dolphin/gd/GDBase.h"
#include <stdint.h>
#include <stdint>
class J3DMatPacket;
+1 -1
View File
@@ -5,7 +5,7 @@
#include "JSystem/J3DAssert.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "global.h"
#include <stdint.h>
#include <stdint>
/**
* @ingroup jsystem-j3d
+1 -1
View File
@@ -2,7 +2,7 @@
#define JAISEQDATAMGR_H
#include "JSystem/JAudio2/JAISound.h"
#include <stdint.h>
#include <stdint>
/**
* @ingroup jsystem-jaudio
+1 -1
View File
@@ -2,7 +2,7 @@
#define JASGADGET_H
#include "JSystem/JUtility/JUTAssert.h"
#include "string.h"
#include <string>
/**
* @ingroup jsystem-jaudio
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JAudio2/JAUBankTable.h"
#include "JSystem/JAudio2/JAUSeqDataBlockMgr.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "bitset.h"
#include <bitset>
class JAISeqData;
class JAISeqDataMgr;
+2 -2
View File
@@ -5,8 +5,8 @@
#include "JSystem/JAudio2/JASAramStream.h"
#include "JSystem/JAudio2/JASHeapCtrl.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "bitset.h"
#include <stdint.h>
#include <bitset>
#include <stdint>
/**
* @ingroup jsystem-jaudio
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JGadget/define.h"
#include "JSystem/JGadget/search.h"
#include <iterator.h>
#include <iterator>
namespace JGadget {
+3 -3
View File
@@ -2,9 +2,9 @@
#define JGADGET_SEARCH_H
#include <dolphin/types.h>
#include <iterator.h>
#include <functional.h>
#include <algorithm.h>
#include <iterator>
#include <functional>
#include <algorithm>
namespace JGadget {
namespace search {
+1 -1
View File
@@ -2,7 +2,7 @@
#define JGADGET_STD_STREAMBUF_H
#include <dolphin/types.h>
#include <string.h>
#include <string>
namespace JGadget {
template <typename T>
+3 -3
View File
@@ -2,9 +2,9 @@
#define STD_VECTOR_H
#include "JSystem/JGadget/std-memory.h"
#include <algorithm.h>
#include <msl_memory.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <stdint>
namespace JGadget {
namespace vector {
+6 -1
View File
@@ -2,9 +2,14 @@
#define JGEOMETRY_H
#include "dolphin/mtx.h"
#include <math.h>
#include <cmath>
#include "JSystem/JMath/JMath.h"
#ifndef __MWERKS__
#include <limits>
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
#endif
namespace JGeometry {
template<typename T>
+1 -1
View File
@@ -2,7 +2,7 @@
#define JORMCONTEXT_H
#include <dolphin/dolphin.h>
#include <stdint.h>
#include <stdint>
#include "JSystem/JHostIO/JORReflexible.h"
#include "JSystem/JSupport/JSUMemoryStream.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#define JKREXPHEAP_H
#include "JSystem/JKernel/JKRHeap.h"
#include <stdint.h>
#include <stdint>
/**
* @ingroup jsystem-jkernel
+2
View File
@@ -204,9 +204,11 @@ void* operator new[](size_t size, JKRHeap* heap, int alignment);
void operator delete(void* ptr);
void operator delete[](void* ptr);
#ifdef __MWERKS__
inline void* operator new(size_t size, void* ptr) {
return ptr;
}
#endif
void JKRDefaultMemoryErrorRoutine(void* heap, u32 size, int alignment);
+1 -1
View File
@@ -2,7 +2,7 @@
#define JMATRIGONOMETRIC_H
#include "dolphin/types.h"
#include <utility.h>
#include <utility>
namespace JMath {
template<typename T>
+1 -1
View File
@@ -2,7 +2,7 @@
#define JMATH_H
#include "dolphin/mtx.h"
#include <math.h>
#include <math>
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
+1 -1
View File
@@ -2,7 +2,7 @@
#define JMESSAGE_PROCESSOR_H
#include "JSystem/JMessage/resource.h"
#include <algorithm.h>
#include <algorithm>
#include "global.h"
namespace JMessage {
+1 -1
View File
@@ -2,7 +2,7 @@
#define JPAEMITTER_H
#include <dolphin/gx.h>
#include <stdint.h>
#include <stdint>
#include "JSystem/JParticle/JPAResource.h"
#include "JSystem/JParticle/JPAList.h"
#include "JSystem/JParticle/JPARandom.h"
@@ -1,7 +1,7 @@
#ifndef FUNCTIONVALUE_H
#define FUNCTIONVALUE_H
#include <math.h>
#include <math>
#include "JSystem/JGadget/std-vector.h"
#include "JSystem/JGadget/define.h"
#include "JSystem/JGadget/search.h"
@@ -2,7 +2,7 @@
#define JSTUDIO_MATH_H
#include "dolphin/mtx.h"
#include <math.h>
#include <math>
namespace JStudio {
namespace math {
@@ -3,8 +3,8 @@
#include "JSystem/JStudio/JStudio/jstudio-control.h"
#include "global.h"
#include <limits.h>
#include <math.h>
#include <limits>
#include <math>
typedef struct _GXColor GXColor;
+1 -1
View File
@@ -2,7 +2,7 @@
#define JSUPPORT_H
#include <dolphin/dolphin.h>
#include <stdint.h>
#include <stdint>
/**
* @ingroup jsystem-jsupport
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JGadget/linklist.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JUtility/JUTFont.h"
#include <stdarg.h>
#include <stdarg>
/**
* @ingroup jsystem-jutility
+1 -1
View File
@@ -2,7 +2,7 @@
#define JUTDIRECTPRINT_H
#include "JSystem/JUtility/TColor.h"
#include <stdarg.h>
#include <stdarg>
/**
* @ingroup jsystem-jutility
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTGamePad.h"
#include <stdarg.h>
#include <stdarg>
#include <dolphin/gx.h>
#include <dolphin/os.h>
#include "global.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#define JUTFONT_H
#include "JSystem/JUtility/TColor.h"
#include "string.h"
#include <string>
/**
* @ingroup jsystem-jutility
+1 -1
View File
@@ -2,7 +2,7 @@
#define JUTTEXTURE_H
#include <dolphin/gx.h>
#include <stdint.h>
#include <stdint>
class JUTPalette;