Jump to: navigation, search

You may like to look at http://www.pobox.com/~qed/pstdint.h for a starter for this header file. It just supports the most standard integer sizes (8, 16, 32, 64 bits), doesn't fill in WCHAR_MIN, WCHAR_MAX and a few others. But it has been tested and works correctly with numerous compilers. [unsigned comment by Qed on 08:27, 12 March 2006 (GMT)]

That would be a great start - we don't currently have anything else for it although Gregory Pietsch may be working on one. I'm aware that Douglas Gwyn has made available a similar file(set) but have examined neither. Seeing as it's your code, why don't you go ahead and import it? --Netocrat 09:15, 12 March 2006 (GMT)
Its has a different mandate that the real stdint.h. Its main emphasis is real world portability (C99 says you have to have a long long type, but my stdint.h allows for older compilers which don't support 64 bit integers), including working well in the presence of a real stdint.h (that's why its named pstdint.h instead of stdint.h). I also don't know how/where to import it to. Qed 09:41, 12 March 2006 (GMT)
You could import it to the article corresponding to this talk page - perhaps you could write above the code what's missing or non-standard (enclose the actual code in <c></c> tags). Then we could merge in what's missing from the header(s) provided by Douglas Gwyn, which I understand are in the public domain.--Netocrat 09:54, 12 March 2006 (GMT)
I hadn't started on this one yet, so you could import it as stdint.h and the rest of us can fill in what's missing from the Standard. I haven't started on inttypes.h yet either. -- Gregory Pietsch 15:56, 12 March 2006 (GMT)
That makes a lot more sense. Better not to use other people's code even if it is in the public domain. --Netocrat 03:43, 13 March 2006 (GMT)

Whist this stdint.h serves the purpose for which it was originally written, I can see a major problem with it as part of the C implementation. The standard C headers must behave as if they don't include other headers, but this one includes various other headers and allows the symbols from them to continue to exist. --Flash Gordon 17:48, 27 March 2006 (BST)

How about a generator program to make stdint.h by compile-time and run-time testing of the integer types? --Random832 05:24, 28 March 2006 (BST)

Sounds good. We could include a sample output header along with the generator's code and a note that a purely portable header just isn't possible but for those who want something close, provide a link back to Qed's header on his site. --Netocrat 22:04, 28 March 2006 (BST)

Are we writing a C implementation?

If we're writing a C implementation, we'd better get busy. If we're not, why are we putting entire system headers into the wiki? This would be like Wikipedia putting entire play scripts in a drama review section. --Rjh 06:25, 5 November 2006 (UTC)

Yes, let's do it. I've been distracted by real life but can help out in fits and starts. Are you able to work on it? --Netocrat 00:31, 7 November 2006 (UTC)

Now THAT is what I call scope creep! --Rjh 07:34, 8 November 2006 (UTC)

Not standard

It's cute, but it's not a valid stdint.h. Standard headers cannot include other standard headers. Neil 07:09, 30 March 2007 (BST)

Personal tools