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 8561613852
commit ea53712c30
342 changed files with 422 additions and 398 deletions
+7 -1
View File
@@ -14,7 +14,7 @@
#include "d/d_com_inf_game.h"
#include "f_op/f_op_camera_mng.h"
#include "m_Do/m_Do_graphic.h"
#include <stdio.h>
#include <stdio>
dRes_info_c::dRes_info_c() {
mCount = 0;
@@ -44,7 +44,9 @@ dRes_info_c::~dRes_info_c() {
int dRes_info_c::set(char const* i_arcName, char const* i_path, u8 i_mountDirection, JKRHeap* i_heap) {
char path[40];
#ifdef __MWERKS__
JUT_ASSERT(120, strlen(i_arcName) <= NAME_MAX);
#endif
if (*i_path != NULL) {
snprintf(path, sizeof(path), "%s%s.arc", i_path, i_arcName);
@@ -334,7 +336,9 @@ int dRes_info_c::loadResource() {
const char* name_p = mArchive->mStringTable + entry->getNameOffset();
size_t resNameLen = strlen(name_p) - 4;
#ifdef __MWERKS__
JUT_ASSERT(0x301, resNameLen <= NAME_MAX);
#endif
char arcName[9];
strncpy(arcName, name_p, resNameLen);
@@ -490,7 +494,9 @@ void dRes_info_c::deleteArchiveRes() {
u32 nameOffset = fileEntry->getNameOffset();
const char* fileName = mArchive->mStringTable + nameOffset;
size_t resNameLen = strlen(fileName) - 4;
#ifdef __MWERKS__
JUT_ASSERT(0x46C, resNameLen <= NAME_MAX);
#endif
char nameBuffer[12];
strncpy(nameBuffer, fileName, resNameLen);