Last Comment Bug 406258 - zlib does not compile with new VC2008 compiler (VC9)
: zlib does not compile with new VC2008 compiler (VC9)
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Tools (show other bugs)
: 3.11.8
: x86 Windows Server 2003
: P1 normal (vote)
: 3.11.9
Assigned To: Julien Pierre
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-30 16:20 PST by Julien Pierre
Modified: 2007-12-03 10:36 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Account for the fact that vsnprintf is defined in VC9 (892 bytes, patch)
2007-11-30 16:21 PST, Julien Pierre
nelson: review+
wtc: superreview+
Details | Diff | Review
Need to patch modules/zlib as well? (861 bytes, patch)
2007-12-02 14:25 PST, Aaron Leventhal
no flags Details | Diff | Review

Description Julien Pierre 2007-11-30 16:20:44 PST
cl -FoWINNT5.2_DBG.OBJ/crc32.obj -c -Od -Z7 -MD -W3 -nologo -GT -DXP_PC -Dverbos
e=-1 -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_Administrator -DWIN32 -D_WINDOWS -D_X86_
-DWINNT -DNSS_ENABLE_ECC -DNSS_ECC_MORE_THAN_SUITE_B -DUSE_UTIL_DIRECTLY -I../..
/../../dist/WINNT5.2_DBG.OBJ/include  -I../../../../dist/public/nss -I../../../.
./dist/private/nss  /c/NSS/tip/mozilla/security/nss/cmd/zlib/crc32.c
crc32.c
D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(358) : err
or C3163: '_vsnprintf': attributes inconsistent with previous declaration
        D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(35
0) : see declaration of '_vsnprintf'
make: *** [WINNT5.2_DBG.OBJ/crc32.obj] Error 2
Comment 1 Julien Pierre 2007-11-30 16:21:42 PST
Created attachment 290933 [details] [diff] [review]
Account for the fact that vsnprintf is defined in VC9
Comment 2 Julien Pierre 2007-11-30 16:22:24 PST
P1 because we want to release 3.11.9 on Win64 with VC9 .
Comment 3 Nelson Bolyard (seldom reads bugmail) 2007-11-30 17:06:35 PST
Is this the ONLY compilation problem for VC9? 
Let's have just one bug for all the VC9-related compilation bugs.

What is the source of the number 1500 in this patch?
Comment 4 Julien Pierre 2007-11-30 17:20:35 PST
Yes, it is the only compilation problem for VC9. The source of the 1500 is that VC9 is CL version 15.00 :

Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
Comment 5 Wan-Teh Chang 2007-11-30 17:43:14 PST
Comment on attachment 290933 [details] [diff] [review]
Account for the fact that vsnprintf is defined in VC9

r=wtc.  We should submit this patch to the zlib maintainer.
Comment 6 Julien Pierre 2007-11-30 18:16:26 PST
checked in to the NSS_3_11_BRANCH :

Checking in zlib/zutil.h;
/cvsroot/mozilla/security/nss/cmd/zlib/zutil.h,v  <--  zutil.h
new revision: 1.6.2.1; previous revision: 1.6
done

and trunk :

Checking in zutil.h;
/cvsroot/mozilla/security/nss/cmd/zlib/zutil.h,v  <--  zutil.h
new revision: 1.7; previous revision: 1.6
done
Comment 7 Aaron Leventhal 2007-12-01 12:37:20 PST
Shouldn't this have been checked into:
/modules/zlib/src/zutil.h
?

I still get the vsnprintf error there.
Comment 8 Aaron Leventhal 2007-12-02 14:25:48 PST
Created attachment 291115 [details] [diff] [review]
Need to patch modules/zlib as well?
Comment 9 Wan-Teh Chang 2007-12-02 18:08:20 PST
Comment on attachment 291115 [details] [diff] [review]
Need to patch modules/zlib as well?

Aaron, this bug is only concerned with the NSS module.
Comment 10 Wan-Teh Chang 2007-12-03 10:36:06 PST
Comment on attachment 291115 [details] [diff] [review]
Need to patch modules/zlib as well?

It seems that you can also fix the vsnprintf issue by
adding vsnprintf to mozilla/configure.in here, assuming
AC_CHECK_FUNCS works with Visual C++:

http://lxr.mozilla.org/seamonkey/source/configure.in#3191

3187 dnl Checks for library functions.
3188 dnl ========================================================
3189 AC_PROG_GCC_TRADITIONAL
3190 AC_FUNC_MEMCMP
3191 AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64)
3192 AC_CHECK_FUNCS(flockfile getpagesize)
Comment 11 Wan-Teh Chang 2007-12-03 10:36:43 PST
Please ignore the previous comment 10.

Note You need to log in before you can comment on or make changes to this bug.