4 ms·
The weird thing I keep seeing is that many C libraries still define their own integer types for some reason instead of just using the ones from stdint.h. Even n
by grishka 5y ago
The weird thing I keep seeing is that many C libraries still define their own integer types for some reason instead of just using the ones from stdint.h. Even new ones, that certainly didn't ever need to support ancient platforms and ancient compilers, like libopus.
- cesarb 5y ago> instead of just using the ones from stdint.h. Even new ones, that certainly didn't ever need to support ancient platforms and ancient compilers, like libopus. But stdint.h is from C99, and AFAIK there are non-ancient compilers for non-ancient platforms that still don't fully support C99.
- uxp100 5y agostdint.h is usually in the part they do support though (I think, in my experience, I haven't done a survey.)
- Nursie 5y ago> many C libraries still define their own integer types for some reason instead of just using the ones from stdint.h Many C developers in my experience (as recent as 5 years ago) haven't really adapted to C99. This is in part because some platforms (Microsoft, I'm looking at you) resisted adopting it for quite some time and partly because a lot of C development is carried out by older developers who have long given up on keeping up with new developments. And I say that as a dev in my 40s. I think stdint etc are great, but for some people the start of any 'serious' C codebase still requires a whole load of int and pointer type redefinitions.
- grishka 5y ago> some platforms (Microsoft, I'm looking at you) Ah, the wonderful world where you pass the dwLength of your lpszName, which is a LPCSTR, as a DWORD.