marcossilvadecastro / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Ensure that use of Microsoft specific functions are guarded by _MSC_VER #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Make sure that functions specific to Microsoft's runtime libraries are used
only inside #ifdef _MSC_VER section. Moreover, there are functions specific
to particular versions of MS compiler, such as secure versions of CRT
functions, like _snprintf_s.

They should be handled like this:
#if _MSC_VER >= 1400
// use _snprintf_s
#endif _MSC_VER >= 1400

Original issue reported on code.google.com by vladlosev on 12 Mar 2009 at 12:04

GoogleCodeExporter commented 9 years ago

Original comment by zhanyong...@gmail.com on 16 Mar 2009 at 5:42

GoogleCodeExporter commented 9 years ago
I think we are doing pretty good on this now.  Can this be closed?

Original comment by zhanyong...@gmail.com on 2 Jun 2009 at 8:06

GoogleCodeExporter commented 9 years ago
No, not in Google Mock. Grep all the instances of GTEST_OS_WINDOWS here, you 
will see
that they all should be replaces with checks for __MSC_VER.

Original comment by vladlosev on 2 Jun 2009 at 3:49

GoogleCodeExporter commented 9 years ago
Not worth it.  Will fix if this leads to a real problem.

Original comment by w...@google.com on 6 Mar 2010 at 5:45