Skip to content

Commit

Permalink
ee_core: _strtoul returns u64 (gcc10 fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickgaiser committed Jan 9, 2021
1 parent 9937e33 commit 04866df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ee_core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ifeq ($(PADEMU),1)
EE_CFLAGS += -DPADEMU
endif

EE_LIBS += -lkernel-nopatch
EE_LIBS += -lkernel-nopatch -lgcc

$(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.c
@mkdir -p $(EE_OBJS_DIR)
Expand Down
2 changes: 1 addition & 1 deletion ee_core/include/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int _toupper(int c);
int _memcmp(const void *s1, const void *s2, unsigned int length);
unsigned int _strtoui(const char *p);
int _strtoi(const char *p);
unsigned long int _strtoul(const char *p);
u64 _strtoul(const char *p);
void set_ipconfig(void);
u32 *find_pattern_with_mask(u32 *buf, unsigned int bufsize, const u32 *pattern, const u32 *mask, unsigned int len);
void CopyToIop(void *eedata, unsigned int size, void *iopptr);
Expand Down
6 changes: 3 additions & 3 deletions ee_core/src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,16 @@ int _strtoi(const char *p)
}

/*----------------------------------------------------------------------------------------*/
/* This function converts string to unsigned long integer. Stops on illegal characters. */
/* This function converts string to u64. Stops on illegal characters. */
/* Put here because including atoi rises the size of loader.elf by another kilobyte */
/* and that causes some games to stop working. */
/*----------------------------------------------------------------------------------------*/
unsigned long int _strtoul(const char *p)
u64 _strtoul(const char *p)
{
if (!p)
return 0;

unsigned long int r = 0;
u64 r = 0;

while (*p) {
if ((*p < '0') || (*p > '9'))
Expand Down

0 comments on commit 04866df

Please sign in to comment.