Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68381 - sandbox/SOC/2010/process/boost/process/detail
From: boris_at_[hidden]
Date: 2011-01-23 09:43:40


Author: bschaeling
Date: 2011-01-23 09:43:40 EST (Sun, 23 Jan 2011)
New Revision: 68381
URL: http://svn.boost.org/trac/boost/changeset/68381

Log:
Changed detection of availability of secure POSIX functions on MSVC
Text files modified:
   sandbox/SOC/2010/process/boost/process/detail/windows_helpers.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: sandbox/SOC/2010/process/boost/process/detail/windows_helpers.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/detail/windows_helpers.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/detail/windows_helpers.hpp 2011-01-23 09:43:40 EST (Sun, 23 Jan 2011)
@@ -67,10 +67,10 @@
             s.push_back(0);
         }
         envp.reset(new char[s.size() + 1]);
-#if defined(__CYGWIN__) || defined(_SCL_SECURE_NO_DEPRECATE)
- memcpy(envp.get(), s.c_str(), s.size() + 1);
-#else
+#if (BOOST_MSVC >= 1400)
         memcpy_s(envp.get(), s.size() + 1, s.c_str(), s.size() + 1);
+#else
+ memcpy(envp.get(), s.c_str(), s.size() + 1);
 #endif
     }
 
@@ -122,10 +122,10 @@
     boost::shared_array<char> cmdline(new char[size]);
     cmdline.get()[0] = '\0';
     for (arguments_t::size_type i = 0; i < args.size(); ++i)
-#if defined(__CYGWIN__) || defined(_SCL_SECURE_NO_DEPRECATE)
- strncat(cmdline.get(), args2[i].c_str(), args2[i].size());
-#else
+#if (BOOST_MSVC >= 1400)
         strcat_s(cmdline.get(), size, args2[i].c_str());
+#else
+ strncat(cmdline.get(), args2[i].c_str(), args2[i].size());
 #endif
 
     return cmdline;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk