Summary
LoadTPage's definition and its declaration disagree on the pointer type of the first parameter — u_int* in the implementation vs. u_long* in the header. This compiles fine on platforms/ABIs where u_int and u_long are the same width, but is a hard "conflicting types" error under strict C on any LP64 platform (e.g. 64-bit Linux/glibc), where int is 32-bit and long is 64-bit.
Where
Declaration, include/psx/libgpu.h:
extern u_short LoadTPage(u_long*pix, int tp, int abr, int x, int y, int w, int h);
Definition, src/psx/LIBGPU.C:
u_short LoadTPage(u_int* pix, int tp, int abr, int x, int y, int w, int h)
Repro
Compiling src/psx/LIBGPU.C as C (not C++) on a 64-bit Linux host with GCC:
error: conflicting types for ‘LoadTPage’; have ‘u_short(u_int *, int, int, int, int, int, int)’
note: previous declaration of ‘LoadTPage’ with type ‘u_short(u_long *, int, int, int, int, int, int)’
Suggested fix
Make the definition's parameter type match the header's (u_long* pix), or vice versa — whichever reflects the actual intended pointer width.
Summary
LoadTPage's definition and its declaration disagree on the pointer type of the first parameter —u_int*in the implementation vs.u_long*in the header. This compiles fine on platforms/ABIs whereu_intandu_longare the same width, but is a hard "conflicting types" error under strict C on any LP64 platform (e.g. 64-bit Linux/glibc), whereintis 32-bit andlongis 64-bit.Where
Declaration,
include/psx/libgpu.h:Definition,
src/psx/LIBGPU.C:Repro
Compiling
src/psx/LIBGPU.Cas C (not C++) on a 64-bit Linux host with GCC:Suggested fix
Make the definition's parameter type match the header's (
u_long* pix), or vice versa — whichever reflects the actual intended pointer width.