git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 03/11] Define SNPRINTF_SIZE_CORR 1 when use MSVC build git

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 18, 2009, 09:31 UTC
Message-ID
<alpine.DEB.1.00.0908181129100.4680@intel-tinevez-2-302>
In-Reply-To
<1976ea660908171819m38d3524ud174a7e76a171e75@mail.gmail.com>
Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
Show 11 quoted lines
> > How about this instead?
> >
> > 	Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++
> >
> > 	The Microsoft C runtime's vsnprintf function does not add NUL at
> > 	the end of the buffer.
> >
> > 	Further, Microsoft deprecated vsnprintf in favor of _vsnprintf, so
> > 	add a #define to that end.
> 
> Of course,  do you need me change commit comment and resend patch?

I think it would be best if you could rewrite your vcpatch branch using the new commit message.

Show 5 quoted lines
> > The patch is good, although I suspect that the definition of vsnprintf 
> > is better handled in the precompiler options in .vcproj.
> 
> If define in .vcproj, it needs copy that to DEBUG\RELEASE and 
> 32bit\64bit (2x2) 4 places. It is easy to miss one.
No, there are the common precompiler options, too.

But maybe it is better to leave the #define's in a header file for another reason: better visibility (I always hated it that I had to open the project files in a text editor in order to find the settings with Visual Studio, the GUI seems to be designed by a fan of hide-and-seek).

Ciao, Dscho

Previous: Frank LiNext: Johannes Schindelin
Message 10 of 26 in “Fix build failure at VC because function declare use old style at regex.c”
  1. 01/11 Fix build failure at VC because function declare use old style at regex.cFrank Li, Aug 17, 2009
  2. 02/11 Fix declare variable at mid of functionFrank Li, Aug 17, 2009
  3. 03/11 Define SNPRINTF_SIZE_CORR 1 when use MSVC build gitFrank Li, Aug 17, 2009
  4. 04/11 Add _MSC_VER predefine macro to make same behaviors with __MINGW32__ Enable MSVC build. MSVC have the save behaviors with msysgit.Frank Li, Aug 17, 2009
  5. Johannes SchindelinAug 17, 2009
  6. Frank LiAug 18, 2009
  7. tom fogalAug 18, 2009
  8. Johannes SchindelinAug 17, 2009
  9. Frank LiAug 18, 2009
  10. Johannes SchindelinAug 18, 2009
  11. Johannes SchindelinAug 17, 2009
  12. Reece DunnAug 17, 2009
  13. Johannes SchindelinAug 17, 2009
  14. Marius Storm-OlsenAug 18, 2009
  15. Johannes SchindelinAug 18, 2009
  16. Frank LiAug 18, 2009
  17. Matthieu MoyAug 18, 2009
  18. Johannes SchindelinAug 19, 2009
  19. Johannes SixtAug 19, 2009
  20. Johannes SchindelinAug 19, 2009
  21. Johannes SixtAug 19, 2009
  22. Junio C HamanoAug 17, 2009
  23. Johannes SchindelinAug 17, 2009
  24. Junio C HamanoAug 17, 2009
  25. Johannes SchindelinAug 17, 2009
  26. Frank LiAug 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.