[PD-dev] comport - compilation with mingw

Roman Haefeli reduzent at gmail.com
Mon Feb 27 21:27:57 CET 2017


On Mon, 2017-02-27 at 14:19 -0500, Martin Peach wrote:
> On Mon, Feb 27, 2017 at 4:28 AM, Roman Haefeli <reduzent at gmail.com>
> wrote:
> > ...
> > 
> > I see you fixed even more for Windows than what I did. I would like
> > to
> > integrate your changes, but there are some questions left. The svn
> > log
> > suggests that you applied some changes specifically for Windows 10.
> > In
> > the diff, I see you wrapped some lines of code in:
> > 
> > #ifdef _MSC_VER
> > 
> > If I understand correctly, those lines are only used when compiling
> > with Microsoft Visual Studio and mingw wouldn't use those lines.
> > I'm
> > compiling with mingw and would like the result to work will in
> > Windows
> > 10, too. Now, my question is: Should the code you put in between
> > '#ifdef _MSC_VER' always be used when targeting Windows, regardless
> > of
> > the compiler or is that code really specific for MSVC?
> > 
> It's used to specify the use of sprintf_s() and  strncpy_s(), the
> safer versions of sprintf() and strncpy(). If your compiler knows
> about these functions it would be better to use them, but not
> essential.

I see. Thanks for the heads-up.

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20170227/8f484d47/attachment.sig>


More information about the Pd-dev mailing list