C standard

Hi All,
With which C standards is WDK compitable ? C95 or C99 ? I’ve found
some header file missed , for example , stdbool.h. Could anyone
help me ? Thanks in advance.

The crt that comes with the WDK is for the inbox crt (msvcrt), that is separate from the compiler. Msvcrt is there to support the OS, not 3rd party code or be up to the latest standards. If you want a more standards based crt, use visual studio.

d

dent from a phpne with no keynoard

-----Original Message-----
From: yushang
Sent: October 25, 2010 6:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] C standard

Hi All,
With which C standards is WDK compitable ? C95 or C99 ? I’ve found
some header file missed , for example , stdbool.h. Could anyone
help me ? Thanks in advance.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

To expand what Doron said, as far as programming in the kernel the best
is to assume C89 without the runtimes.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> The crt that comes with the WDK is for the inbox crt (msvcrt), that is separate from the compiler. Msvcrt is there to support the OS, not 3rd party code or be up to the latest standards. If you want a more standards based crt, use visual studio.
>
> d
>
> dent from a phpne with no keynoard
>
> -----Original Message-----
> From: yushang
> Sent: October 25, 2010 6:53 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] C standard
>
>
> Hi All,
> With which C standards is WDK compitable ? C95 or C99 ? I’ve found
> some header file missed , for example , stdbool.h. Could anyone
> help me ? Thanks in advance.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Many thanks . I’va found it really match the C89

2010/10/25 Don Burn :
> To expand what Doron said, as far as programming in the kernel the best is
> to assume C89 without the runtimes.

> as far as programming in the kernel the best is to assume C89 without the runtimes.

Actually, I am always surprised by the numbers of those who ask about runtime and standard headers in context of kernel-level programming regardless of the OS. People just seem to refuse to understand the simple
fact that C in itself is just syntax and compiler. I remember the moronic eyes of one “highly mathematical” graduate (who, btw, was capable of programming only in Delphi) who asked me about getting the current time in C and, certainly, got the counter-question "In which context are you asking this??? What are your target libraries???'. She did not even understand what I was asking her about, because she knows only those languages that come as a toolbox with predefined set of functions…

Anton Bassov

Sorry, but having been on various language standard efforts, and
runtimes are always part of the language. C is not just the syntax and
the compiler, even this is wrong since the semantics are where the
standards efforts take all the time. So I very much stand by my
statement quoted below.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@hotmail.com” wrote in message
news:xxxxx@ntdev:

> > as far as programming in the kernel the best is to assume C89 without the runtimes.
>
> Actually, I am always surprised by the numbers of those who ask about runtime and standard headers in context of kernel-level programming regardless of the OS. People just seem to refuse to understand the simple
> fact that C in itself is just syntax and compiler. I remember the moronic eyes of one “highly mathematical” graduate (who, btw, was capable of programming only in Delphi) who asked me about getting the current time in C and, certainly, got the counter-question "In which context are you asking this??? What are your target libraries???'. She did not even understand what I was asking her about, because she knows only those languages that come as a toolbox with predefined set of functions…
>
>
> Anton Bassov

xxxxx@hotmail.com wrote:

Actually, I am always surprised by the numbers of those who ask about runtime and standard headers in context of kernel-level programming regardless of the OS. People just seem to refuse to understand the simple fact that C in itself is just syntax and compiler.

That’s an overly simplistic view. You can certainly talk about “the C
language” in that sense, but in fact the ISO standards for C and C++
cover to both the syntax and the required standard library behind it.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Is the OP just after “standard” types and definitions like stdbool.h or stdint.h, to port some opensource stuff?

AFAIK these useful includes were not in any MS C[++] kit until VC 2010.
OP can try to borrow from there.
Maybe they will percolate to WDK some day… or won’t.

What else… MSC in C mode does not allow c++ isms (declaration after operator, declaration in for as in gcc with -std=c99) but then one can compile in c++ mode, and get bool keywors for free.

–pa

Are the “Take it to NTTALK” police on vacation?

On the plus side, now I not only have a rule which bit-buckets Anton’s
“contributions”, I just wrote one which bit-buckets REPLIES to Anton.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, October 25, 2010 1:23 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] C standard

xxxxx@hotmail.com wrote:
>
> Actually, I am always surprised by the numbers of those who
ask about runtime and standard headers in context of
kernel-level programming regardless of the OS. People just
seem to refuse to understand the simple fact that C in
itself is just syntax and compiler.

That’s an overly simplistic view. You can certainly talk
about “the C language” in that sense, but in fact the ISO
standards for C and C++ cover to both the syntax and the
required standard library behind it.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

>On the plus side, now I not only have a rule which bit-buckets Anton’s “contributions”, I just wrote one

which bit-buckets REPLIES to Anton.

Have you got anything else to say, apart from launching personal attacks???

Anton Bassov

Don And Tim,

AFAIK, all existing standards end where the kernel starts. I DO agree that your statements may apply in the userland where they have C runtime standard (IIRC, 24 headers) that different OSes are supposed to implement, regardless of the actual system architecture. However, C language in itself is not required to provide these libraries, right. Otherwise all kernel-level code of all existing OSes would not qualify for being written in C

What am I missing here?

Anton Bassov

The adult supervision has returned:

Children… PLEASE.

Peter
OSR

P.S. Take it to NTTALK

I’m suprised this post got so many responds . In fact I’m using WDK to
compile a user mode package . I’m know with VS everything will go
smoothly , I just want to excerise it on WDK. Anyway , thanks.

xxxxx@hotmail.com wrote:

Don And Tim,

AFAIK, all existing standards end where the kernel starts. I DO
agree that your statements may apply in the userland where they
have C runtime standard (IIRC, 24 headers) that different OSes
are supposed to implement, regardless of the actual system
architecture. However, C language in itself is not required to
provide these libraries, right. Otherwise all kernel-level code
of all existing OSes would not qualify for being written in C

What am I missing here?

The C Language defines two environments, ‘hosted’ and ‘freestanding’.
The hosted version of C includes the “library features” which are
defined as part of the C language. The freestanding version includes
only a tiny subset of the library features, such as <stdarg.h>.

The Windows kernel environment is a freestanding C90 implementation with
extensions (more or less, can’t swear that it’s spot-on).</stdarg.h>