Hi, I get a couple of "undefined reference to `strtoimax'" on linking stage:
gcc main.o data.o seg000.o seg001.o seg002.o seg003.o seg004.o seg005.o seg006.o seg007.o seg008.o seg009.o seqtbl.o replay.o options.o lighting.o screenshot.o menu.o midi.o opl3.o stb_vorbis.o -o ../prince -lSDL2_image -ltiff -lpng -ljpeg -lz -lvorbisfile -lvorbis -logg -lSDL2 -lm
options.o: In function `ini_process_word.part.2':
options.c:135: undefined reference to `strtoimax'
options.o: In function `ini_process_byte.part.3':
options.c:137: undefined reference to `strtoimax'
options.o: In function `ini_process_sbyte.part.4':
options.c:138: undefined reference to `strtoimax'
options.o: In function `global_ini_callback':
options.c:139: undefined reference to `strtoimax'
options.c:136: undefined reference to `strtoimax'
...
and line/code is:
*target = (named_value == INI_NO_VALID_NAME) ? ((data_type) strtoimax(value, NULL, 0)) : ((data_type) named_value);
...
using newlib (latest AFAIK), and compiling on AmigaOS4/SAM460ex.
Is such function impletemented?
Workaround'ed by using:
#define strtoimax(a,b,c) strtol(a,b,c)
Hope it doesn't break antything.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
intmax_t should be defined as "signed long long", so strtoll() would be a more appropriate replacement.
THX changed to use strtoll()
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P