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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 18 Aug 2009, Frank Li wrote:

> > 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.

> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]