Re: [AD] WIP 4.1.15 and CVS freeze |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Well, the unix functions use a struct with two long values, one for
> seconds, one for us or even ns. Which I find kind of awkward, always
> need to multiple/divide with 1000000 or 1000000000.
Agreed.
> Unix sleep is sleep
> (unsigned int). Windows uses Sleep(DWORD), SDL uses SDL_Delay(Uint32).
It's been a while, but I think a DWORD in Windows is a signed 32-bit integer?
If that's correct, then it lookes like there would be a slight preference for
unsigned int.
> Yes, I didn't see any issue at all when changing it first. So, I'll
> modify the patch to keep long, and apply it. We can worry about
> generally cleaning types, and maybe even using the new C99 types like
> uint32_t where it makes sense (and providing typedefs for platforms
> without C99).
UNIX and Linux compilers typically have typedefs defined even for non-C99
compilers. I'm not sure I relish the idea of mixing in C99 features with
Allegro's current code though.
> Along that, we can athen lso get rid of all "long" values,
> since that type makes little sense, given it is the same as int on most
> 32-bit platforms (and probably 64-bit as well).
Is this true of MSVC as well? For the 64 bit target, I think it makes int 32 bit
and a long 64 bit.
Evert