Closed Bug 487239 Opened 13 years ago Closed 13 years ago

nssutil.rc doesn't compile on WinCE


(NSS :: Libraries, defect, P1)

Windows Mobile 6 Professional


(Not tracked)



(Reporter: wolfe, Assigned: rrelyea)



(Keywords: mobile)


(1 file, 1 obsolete file)

Compiling the RC file for NSS Util (security/nss/lib/util/nssutil.rc) is currently broken for WinCE.  Here is the output of the build process when it breaks:

make[7]: Entering directory `/c/hg/mozilla-central/security/nss/lib/util'
/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/sdk/bin/arm-wince-res  -DDEBUG -D_DEBUG -DDEBUG_wolfe -D_WINDOWS -DNSS_ENABLE_ECC -DNSS_DISABLE_DBM -DUSE_UTIL_DIRECTLY -I/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr -Ic:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include -I/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/public/nss -I/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/private/nss -I/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include  -Fo/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/nss/nssutil/nssutil.res nssutil.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation.  All rights reserved.

c:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr\prcpucfg.h(301) : error RC2188: c:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr\prtypes.h(274) : error RC2188: c:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr\prtypes.h(299) : error RC2188: c:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr\prtypes.h(331) : error RC2188: c:/hg/mozilla-central/objdir-wm6-dbg/xulrunner/dist/include/nspr\prtypes.h(396) : error RC2188: c:\hg\mozilla-central\objdir-wm6-dbg\xulrunner\nss\nssutil\RCa00432(101) : fatal error RC1116: RC terminating after preprocessor errors

make[7]: *** [/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/nss/nssutil/nssutil.res] Error 6
make[7]: Leaving directory `/c/hg/mozilla-central/security/nss/lib/util'
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/c/hg/mozilla-central/security/nss/lib'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner/security/manager'
make[4]: *** [libs_tier_toolkit] Error 2
make[4]: Leaving directory `/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner'
make[3]: *** [tier_toolkit] Error 2
make[3]: Leaving directory `/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/c/hg/mozilla-central/objdir-wm6-dbg/xulrunner'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/hg/mozilla-central'
make: *** [build] Error 2

This is caused because the header file NSSUTIL.H did not include the "#ifndef RC_INVOKED" / "#endif" pair appropriately when NSSUTIL.H was created from NSS.H
Attachment #371468 - Flags: review?(kaie)
Comment on attachment 371468 [details] [diff] [review]
v1.0 patch - HG format

Moved from Kaie because he does not seem to be on-line right now
Attachment #371468 - Flags: review?(kaie) → review?(bugmail)
Comment on attachment 371468 [details] [diff] [review]
v1.0 patch - HG format

nssuti.rc used to include nss.h, which had seccommon.h surrounded by "#ifndef RC_INVOKED"

    75 #ifndef RC_INVOKED


    77 #include "seccomon.h"

now it includes nssutil.h which doesn't.  Wrapping that include in #ifndef RC_INVOKED makes sense to me, but I'm not a peer. Asking for additional review from Nelson.
Attachment #371468 - Flags: review?(nelson)
Attachment #371468 - Flags: review?(bugmail)
Attachment #371468 - Flags: review+
Comment on attachment 371468 [details] [diff] [review]
v1.0 patch - HG format

r=nelson for 3.12.4
Attachment #371468 - Flags: review?(nelson) → review+
Version: unspecified → 3.12.3
Summary: WinCE RC Compiling of nssutil.rc broken → nssutil.rc doesn't compile on WinCE
I'm giving this to Bob so that all the new WinCE bugs will be assigned to 
one person.  They're less likely to fall through the cracks that way, IMO.
Assignee: nobody → rrelyea
Severity: normal → blocker
Priority: -- → P1
Target Milestone: --- → 3.12.4
Checking in util/nssutil.h;     new revision: 1.3;  previous revision: 1.2
Checking in softoken/sdb.c;     new revision: 1.12; previous revision: 1.11
Checking in softoken/sftkmod.c; new revision: 1.5;  previous revision: 1.4
Closed: 13 years ago
Resolution: --- → FIXED
Attached patch Do not include seccomon.h (obsolete) — Splinter Review
All nssutil.h does is to define a few version macros, so
it doesn't need to include any header at all.
Attachment #371748 - Flags: review?(nelson)
Attachment #371748 - Attachment is obsolete: true
Attachment #371748 - Flags: review?(nelson)
Comment on attachment 371748 [details] [diff] [review]
Do not include seccomon.h

Sorry, I was wrong.  It needs the definition of PR_FALSE and PR_TRUE
for the NSSUTIL_BETA macro.

So the v1.0 patch (attachment 371468 [details] [diff] [review]) is still not quite correct
because nssutil.rc tests the NSSUTIL_BETA macro.  But this is a very
minor issue because it only affects the VS_FF_PRERELEASE bit in the
version info resource:


So RC will see the above code as

  #if PR_FALSE

Since PR_FALSE is not defined, it gets the default value of 0L.

I think this minor issue is not worth fixing...
Wan-Teh,  how about:

#ifndef PR_FALSE
#define PR_FALSE 0
#ifndef PR_TRUE
#define PR_TRUE 1

to follow the ifdef?
Blocks: 487712
You need to log in before you can comment on or make changes to this bug.