FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
549 stars 107 forks source link

Win32 : Fix msvc x64 build #430

Closed MoeMod closed 5 years ago

a1batross commented 5 years ago

@MoeMod I suppose GitHub still have review comments bug, where PR author isn't notified.

So... well, if you have plans on updating this PR, read review comments and let me know. :)

MoeMod commented 5 years ago

@a1batross Sorry for my late reply, but I have no idea where I can got those review comments right now. Could you tell me where I can got them?

a1batross commented 5 years ago

@MoeMod nevermind, I re-added them for you. :)

a1batross commented 5 years ago

Looks fine. Merging.

nillerusr commented 5 years ago

hey fag You broken build on linux and android with 64-bit support

server/sv_game.c: In function 'SV_AllocStringPool': server/sv_game.c:3146:30: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'? str64.pstringarraystatic = (uintptr_t)ptr + str64.maxstringarray; ^~~~~ intptr_t server/sv_game.c:3146:30: note: each undeclared identifier is reported only once for each function it appears in server/sv_game.c:3146:40: error: expected ';' before 'ptr' str64.pstringarraystatic = (uintptr_t)ptr + str64.maxstringarray; ^~~ ; server/sv_game.c:3148:27: error: expected ';' before 'ptr' str64.plast = (uintptr_t)ptr + 1; ^~~ ;

MoeMod commented 5 years ago

hey fag You broken build on linux and android with 64-bit support

server/sv_game.c: In function 'SV_AllocStringPool': server/sv_game.c:3146:30: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'? str64.pstringarraystatic = (uintptr_t)ptr + str64.maxstringarray; ^~~~~ intptr_t server/sv_game.c:3146:30: note: each undeclared identifier is reported only once for each function it appears in server/sv_game.c:3146:40: error: expected ';' before 'ptr' str64.pstringarraystatic = (uintptr_t)ptr + str64.maxstringarray; ^~~ ; server/sv_game.c:3148:27: error: expected ';' before 'ptr' str64.plast = (uintptr_t)ptr + 1; ^~~ ;

Really sorry for that. What compiler are you using? In my opinion, C and C++ compilers should have uintptr_t defined.

nekonomicon commented 5 years ago

uintptr_t defined in stdint.h, but stdint.h - part of C99, not C90. Why not use ptrdiff_t and size_t? This types is equal.

a1batross commented 5 years ago

My bad, I didn't noticed uintptr_t.

@nillerusr 64-bit on Android was NEVER supported. So if you smart enough, go and make another pull request, instead of insulting people.

MoeMod commented 5 years ago

maybe change ptr's type from void to byte to avoid uintptr_t?

a1batross commented 5 years ago

Yeah, with byte* we can still use pointer arithmetics.

MoeMod commented 5 years ago

new request at #451