Time Nick Message 11:35 sfan5 merging #16686, #16704, #16705 in 20m 11:35 ShadowBot https://github.com/luanti-org/luanti/issues/16686 -- [no squash] Call fsync in safeWriteToFile() by sfan5 11:35 ShadowBot https://github.com/luanti-org/luanti/issues/16704 -- Fix minimap rendering regression by appgurueu 11:35 ShadowBot https://github.com/luanti-org/luanti/issues/16705 -- Bump all used GitHub Actions by AFCMS 12:13 [MatrxMT] sfan5 12:13 sfan5 my clock runs slower 17:54 SFENCE Luanti migration to iOS... iOS have endian.h, but not be16toh, htobe16 and similar functions used in serialize.h for readU16, writeU16 and similar functions. 17:55 SFENCE If I add conditional preprocesor code for iOS, Sounds it as good solution for it? 18:10 MTDiscord serialization code for integers should not need those at at all, you just use bitops to get the lowest/highest byte... 18:12 MTDiscord wait actually we have those fallbacks already in place, now i see what you mean 18:13 MTDiscord i guess abridging the condition from HAVE_ENDIAN_H to something else makes sense, yeah 18:15 MTDiscord what's your concern with doing that? 19:11 SFENCE My concern is to do something like this: https://pastebin.com/VqCrMPeP 19:11 SFENCE for iOS at least. 23:32 MTDiscord well that would indeed be suboptimal i think, but you don't have to do that? 23:32 MTDiscord as said, if you look at serialize.h, there's an #if HAVE_ENDIAN_H ... #else ... 23:33 MTDiscord so if you just change the #if condition to take into account that despite having endian.h, apple doesn't define these functions under these names, that'll work 23:33 MTDiscord that's the lazy solution 23:34 MTDiscord but really i think it probably is a decent solution 23:36 MTDiscord clang and gcc at least seem to recognize the pattern used for the fallback, optimizing it to a bswap, so there's no performance hit 23:37 MTDiscord so there's no need to complicate the code here. if anything, it should probably be simplified by only using the fallback code 23:38 MTDiscord if for some reason you do really want to use the stdlib builtins for iOS, you should abstract over these byteswap util funcs in porting.h