Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
debate: char vs. byte
zieQ:
Well I suggest not to use stdint.h or inttypes.h since they do not exist in all compiler installation. AFAIK MSVC 6 & 7 do not have any and I would like to compile C::B with MSVC Toolkit one day...
takeshimiya:
Well, then MSVC 6 & 7 doesn't support C99.
I would suggest doing what boost library do, adding support for the rest of compilers.
I've done something simmilar to this in the past, in a project at sourceforge (called XTypes).
http://sourceforge.net/project/showfiles.php?group_id=96797&package_id=104367&release_id=229086
The important here is to write the code using the intXX_t typedef's.
The header name isn't that important, you can change it later,
but for the integer types, you can't change by doing a search&replace in all the code.
I think this have more importance now that we are in the 32bits/64bits transition period.
takeshimiya:
me22: I forgot to add the <stdint.h> location in the book:
It's on chapter 7. Library - 7.18 Integer types <stdint.h>
on page 268/554 of the PDF, page 254 of the book.
zieQ:
I agree here. I've already seen a HAVE_STDINT in some project makefiles so you know if you can use stdint.h or a custom made int definition for thoses typedefs.
takeshimiya:
:) Yep, various compilers, GCC for example defines in the headers
#define _STDINT_H
#define _INTTYPES_H_
So you can #ifdef these.
Navigation
[0] Message Index
[*] Previous page
Go to full version