Hello, first-time poster here…
I have source files that are used in user- and kernel-level builds, so I
would like a symbol to distinguish between the two modes.
In SOURCES you specify UMTYPE=nt to indicate a kernel-level build, and
=windows to indicate a user-level build, so I changed UMTYPE to each of
those, used build -cef and saved the build.log, then compared the two log
files to see what differed…
When compiling one of my libraries and the driver that uses it I found no
differences (except for tmpfilename), especially none with the CL.EXE
command-line… no symbol defined that indicates a kernel-level vs. a
user-level build…
Am I missing something?
Of course, I can use C_DEFINES to define my own symbol, but then someone
could change UMTYPE without changing C_DEFINES…
Thanks in advance. (And thanks to OSR for providing a forum to post
questions like this.)
Bart.
> command-line… no symbol defined that indicates a kernel-level vs. a
user-level build…
Looks like defining your own name is the only way.
Max
Thanks!
Bart.
Maxim S. Shatskih wrote in message
news:xxxxx@ntdev…
>
> > command-line… no symbol defined that indicates a kernel-level vs. a
> > user-level build…
>
> Looks like defining your own name is the only way.
>
> Max
>
>
>
Those symbols are for the build utility not for the compiler.
----- Original Message -----
From: “Bart Crane”
Newsgroups: ntdev
To: “NT Developers Interest List”
Sent: Tuesday, April 23, 2002 4:20 AM
Subject: [ntdev] Compiler Symbol for Kernel Build
> Hello, first-time poster here…
>
> I have source files that are used in user- and kernel-level builds, so I
> would like a symbol to distinguish between the two modes.
>
> In SOURCES you specify UMTYPE=nt to indicate a kernel-level build, and
> =windows to indicate a user-level build, so I changed UMTYPE to each of
> those, used build -cef and saved the build.log, then compared the two log
> files to see what differed…
>
> When compiling one of my libraries and the driver that uses it I found no
> differences (except for tmpfilename), especially none with the CL.EXE
> command-line… no symbol defined that indicates a kernel-level vs. a
> user-level build…
>
> Am I missing something?
>
> Of course, I can use C_DEFINES to define my own symbol, but then someone
> could change UMTYPE without changing C_DEFINES…
>
> Thanks in advance. (And thanks to OSR for providing a forum to post
> questions like this.)
>
> Bart.
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@vba.com.by
> To unsubscribe send a blank email to %%email.unsub%%
>
Yes, I was hoping that build would be pass something along to cl, so source
could be conditionally compiled accordingly. I remember comparing build.log
after using UMTYPE as nt, windows, and console, and finding no differences
in the command-line definitions, but was hoping maybe I missed something.
Bart.
“Alexey Logachyov” wrote in message news:xxxxx@ntdev…
>
> Those symbols are for the build utility not for the compiler.
>
> ----- Original Message -----
> From: “Bart Crane”
> Newsgroups: ntdev
> To: “NT Developers Interest List”
> Sent: Tuesday, April 23, 2002 4:20 AM
> Subject: [ntdev] Compiler Symbol for Kernel Build
>
>
> > Hello, first-time poster here…
> >
> > I have source files that are used in user- and kernel-level builds, so I
> > would like a symbol to distinguish between the two modes.
> >
> > In SOURCES you specify UMTYPE=nt to indicate a kernel-level build, and
> > =windows to indicate a user-level build, so I changed UMTYPE to each of
> > those, used build -cef and saved the build.log, then compared the two
log
> > files to see what differed…
> >
> > When compiling one of my libraries and the driver that uses it I found
no
> > differences (except for tmpfilename), especially none with the CL.EXE
> > command-line… no symbol defined that indicates a kernel-level vs. a
> > user-level build…
> >
> > Am I missing something?
> >
> > Of course, I can use C_DEFINES to define my own symbol, but then someone
> > could change UMTYPE without changing C_DEFINES…
> >
> > Thanks in advance. (And thanks to OSR for providing a forum to post
> > questions like this.)
> >
> > Bart.
>
AFAIK the environment variable NTDEBUG tells one from the other. The checked
build has NTDEBUG=NTSD, while the free build has NTDEBUG=NTSDNODBG. That
should tell you the difference.
Alberto.
-----Original Message-----
From: Bart Crane [mailto:xxxxx@iready.com]
Sent: Friday, May 10, 2002 3:01 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Compiler Symbol for Kernel Build
Yes, I was hoping that build would be pass something along to cl, so source
could be conditionally compiled accordingly. I remember comparing build.log
after using UMTYPE as nt, windows, and console, and finding no differences
in the command-line definitions, but was hoping maybe I missed something.
Bart.
“Alexey Logachyov” wrote in message news:xxxxx@ntdev…
>
> Those symbols are for the build utility not for the compiler.
>
> ----- Original Message -----
> From: “Bart Crane”
> Newsgroups: ntdev
> To: “NT Developers Interest List”
> Sent: Tuesday, April 23, 2002 4:20 AM
> Subject: [ntdev] Compiler Symbol for Kernel Build
>
>
> > Hello, first-time poster here…
> >
> > I have source files that are used in user- and kernel-level builds, so I
> > would like a symbol to distinguish between the two modes.
> >
> > In SOURCES you specify UMTYPE=nt to indicate a kernel-level build, and
> > =windows to indicate a user-level build, so I changed UMTYPE to each of
> > those, used build -cef and saved the build.log, then compared the two
log
> > files to see what differed…
> >
> > When compiling one of my libraries and the driver that uses it I found
no
> > differences (except for tmpfilename), especially none with the CL.EXE
> > command-line… no symbol defined that indicates a kernel-level vs. a
> > user-level build…
> >
> > Am I missing something?
> >
> > Of course, I can use C_DEFINES to define my own symbol, but then someone
> > could change UMTYPE without changing C_DEFINES…
> >
> > Thanks in advance. (And thanks to OSR for providing a forum to post
> > questions like this.)
> >
> > Bart.
>
—
You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to %%email.unsub%%
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.