Closed Bug 4297 Opened 26 years ago Closed 26 years ago

Use of 'stack' as arg causes pblm.

Categories

(NSPR :: NSPR, defect, P3)

x86
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: joseph.gregorio, Assigned: wtc)

Details

In lines 460, 499 and 515 of prio.h 'stack' is used as a argument variable name which conflicts with the class name 'stack' in the STL. I am running into this trying to embed NGLayout in a Win32 application which uses an STL based class library to wrap the Win32 API.
Assignee: troy → wtc
Component: Layout → NSPR
prio.h has nothing to do with layout...
Status: NEW → ASSIGNED
Accepted the bug. Added srinivas and larryh to the cc list. Can you paste the compiler error messages? Which version of what compiler are you using?
I am using Microsoft Visual C++ 5.0. Included before prio.h is the inclusion of <stack> from the STL. Here is an example of the compiler output: cd d:/sw_dev/Chipmunk/moztest/ perl.exe d:\perl\bin\m.pl Microsoft (R) Program Maintenance Utility Version 1.62.7022 Copyright (C) Microsoft Corp 1988-1997. All rights reserved. Cl.exe @C:\TEMP\nma00075. MozTestView.cpp d:\mozilla\dist\WIN32_D.OBJ\include\prio.h(460) : error C2955: 'stack' : use of class template requires template argument list nsSetupRegistry.cpp Skipping... (no relevant changes detected) MozTest.cpp MozTestInstanceHandle.cpp NMAKE : fatal error U1077: 'Cl.exe' : return code '0x2' Stop. Compilation finished at Fri Mar 26 12:52:56 Just changing 'stack' to 'aStack' fixes it for me.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I changed 'stack' to 'fd_stack'. /cvsroot/mozilla/nsprpub/pr/include/prio.h, revision 3.8. This fix is also checked into the internal CVS repository. /m/src/ns/nspr20/pr/include/prio.h, revision 2.20. Joseph, can you verify this fix? Thanks.
I am sorry that it is taking me so long to verify this fix, but no one in your organization seems to give a snot that the nightly tar-balls don't build under Win32.
I am surprised that the nightly tar-balls don't build under Win32 because many developers build under Win32 every day.
Status: RESOLVED → VERIFIED
I finally got the tar ball to build this afternoon ( I was missing set MODULAR_NETLIB=1 ) and everything looks fine.
NSPR now has its own Bugzilla product. Moving this bug to the NSPR product.
You need to log in before you can comment on or make changes to this bug.